Re: [PATCH 3/4] Fix backtrace in network.dracutSetupString in the static ip case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hans de Goede wrote:
NetworkDevice.get() only takes one argument, iow its not like the
standard get on a dictionary. This patch fixes the assumption that it
is thereby fixing a backtrace when using static ip configuration.
---
 network.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

Looks good to me.

diff --git a/network.py b/network.py
index db1fab1..2d727b9 100644
--- a/network.py
+++ b/network.py
@@ -805,11 +805,15 @@ class Network:
         if dev.get('bootproto').lower() == 'dhcp':
             return "ip=%s:dhcp" % routeInfo[2]
+ if dev.get('GATEWAY'):
+            gateway = dev.get('GATEWAY')
+        else:
+            gateway = ""
+
         if self.hostname:
             hostname = self.hostname
         else:
             hostname = ""
- ip = "ip=%s::%s:%s:%s:none" % (dev.get('ipaddr'),
-             dev.get('GATEWAY', ''), dev.get('netmask'), hostname,
-             routeInfo[2])
+        return "ip=%s::%s:%s:%s:%s:none" % (dev.get('ipaddr'), gateway,
+               dev.get('netmask'), hostname, routeInfo[2])

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux