Merge citrix into master.
[sliver-openvswitch.git] / xenserver / opt_xensource_libexec_interface-reconfigure
index 98bcf4c..b2d5511 100755 (executable)
@@ -266,16 +266,12 @@ def get_netdev_tx_queue_len(device):
         return None
 
 def get_netdev_by_mac(mac):
-    maybe = None
     for device in os.listdir("/sys/class/net"):
         dev_mac = get_netdev_mac(device)
-        if dev_mac and mac.lower() == dev_mac.lower():
-            if get_netdev_tx_queue_len(device):
+        if (dev_mac and mac.lower() == dev_mac.lower() and
+            get_netdev_tx_queue_len(device)):
                 return device
-            if not maybe:
-                # Probably a datapath internal port.
-                maybe = device
-    return maybe
+    return None
 
 #
 # Helper functions for encoding/decoding database attributes to/from XML.