[PATCH 06/10] Network spoke: check whether added network device is already in list (#906272)
Chris Lumens
clumens at redhat.com
Mon Mar 11 15:33:45 UTC 2013
> @@ -569,8 +568,12 @@ class NetworkControlBox(object):
> return None
>
> def _device_is_stored(self, nm_device):
> - """TODO check that device with Udi of nm_device is already in
> - liststore"""
> + """Check that device with Udi of nm_device is already in liststore"""
> + udi = nm_device.get_udi()
> + model = self.builder.get_object("liststore_devices")
> + for row in model:
> + if (udi == row[DEVICES_COLUMN_OBJECT].get_udi()):
> + return True
> return False
You don't need the extra parens here. Picky, but I don't like having
them if they're not necessary.
- Chris
More information about the anaconda-patches
mailing list