Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> network : Fixed saving DHCP ifcfgs.
  • From: Martin Vidner <mvidner@xxxxxxx>
  • Date: Mon, 21 Sep 2009 12:48:10 +0200
  • Message-id: <E1MpgSp-0008E6-B9@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit e35ad531fd3506fd9da0671c0027ad4c8168a81d
Author: Martin Vidner <mvidner@xxxxxxx>
Date: Sat Sep 19 08:49:00 2009 +0200

Fixed saving DHCP ifcfgs.

Empty string in XML appears as nil after Hash.from_xml,
which cannot be passed over DBus.
TODO: make this more generic.
Write a test.
---
plugins/network/app/models/interface.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/network/app/models/interface.rb
b/plugins/network/app/models/interface.rb
index f23c88a..fdde216 100644
--- a/plugins/network/app/models/interface.rb
+++ b/plugins/network/app/models/interface.rb
@@ -14,7 +14,7 @@ class Interface

def initialize(kwargs, id=nil)
@bootproto = kwargs["bootproto"]
- @ipaddr = kwargs["ipaddr"]
+ @ipaddr = kwargs["ipaddr"] || ""
@id = kwargs["id"] || id
end

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages