[PATCH 19/22] Remove no longer needed devices argument from Network.write().

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

 



Now when we set NM_CONTROLLED parameter more carefully before
writing a device, this parameter introduced by patch 898a891c
is no longer needed. OTOH it doesn't break anything and may
become handy in the future.
---
 network.py              |    9 ++++-----
 textw/netconfig_text.py |    4 +---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/network.py b/network.py
index 76355a4..d947011 100644
--- a/network.py
+++ b/network.py
@@ -544,10 +544,9 @@ class Network:
 
         return False
 
-    def write(self, instPath='', anaconda=None, devices=None):
+    def write(self, instPath='', anaconda=None):
 
-        if devices is None:
-            devices = self.netdevices.values()
+        devices = self.netdevices.values()
 
         if len(devices) == 0:
             return
@@ -750,8 +749,8 @@ class Network:
     # write out current configuration state and wait for NetworkManager
     # to bring the device up, watch NM state and return to the caller
     # once we have a state
-    def bringUp(self, devices=None):
-        self.write(devices=devices)
+    def bringUp(self):
+        self.write()
         return self.waitForConnection()
 
     # get a kernel cmdline string for dracut needed for access to host host
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 41c0376..9b0b156 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -202,13 +202,11 @@ class NetworkConfiguratorText:
                     dev.set(('NM_CONTROLLED', 'no'))
                     dev.set(('ONBOOT', 'no'))
 
-            selected_netdevs = []
             for devname in selected:
                 if not netdevs.has_key(devname):
                     continue
 
                 netdev = netdevs[devname]
-                selected_netdevs.append(netdev)
                 netdev.set(("ONBOOT", "yes"))
 
                 if self.dhcpCheckbox.selected():
@@ -276,7 +274,7 @@ class NetworkConfiguratorText:
                         continue
 
             w = self.anaconda.intf.waitWindow(_("Configuring Network Interfaces"), _("Waiting for NetworkManager"))
-            result = self.anaconda.network.bringUp(devices=selected_netdevs)
+            result = self.anaconda.network.bringUp()
             w.pop()
             if result:
                 break
-- 
1.6.0.6

_______________________________________________
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