Re: [PATCH master] Honor selected hostname on Live CD (#638634)

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

 



On 10/01/2010 06:35 PM, Brian C. Lane wrote:

+    @property
+    def gateway(self):
+        """GATEWAY - last device in list wins"""
+        gw = ""
+        for dev in self.netdevices.values():
+            gw = dev.get('GATEWAY')
+        return gw
Is this a list? why not use self.netdevices.values()[-1]? After checking
to make sure len is>  0 of course.


Aah thanks, stupid me, it should be:

for dev in self.netdevices.values():
    if dev.get('GATEWAY'):
        gw = dev.get('GATEWAY')

Radek

_______________________________________________
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