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