etherlab/etherlab.py
changeset 2377 88a9d64560d3
parent 2376 47775c9367bd
child 2378 7aa47c09f8f5
--- a/etherlab/etherlab.py	Sat Sep 29 13:30:41 2018 +0300
+++ b/etherlab/etherlab.py	Sat Sep 29 13:34:06 2018 +0300
@@ -240,7 +240,7 @@
 
                     for device in self.devices_xpath(self.modules_infos):
                         device_group = device.getGroupType()
-                        if not vendor_category["groups"].has_key(device_group):
+                        if device_group not in vendor_category["groups"]:
                             raise ValueError, "Not such group \"%\"" % device_group
                         vendor_category["groups"][device_group]["devices"].append(
                             (device.getType().getcontent(), device))