fix value error
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 24 Oct 2012 02:36:29 +0000 (22:36 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 24 Oct 2012 02:36:29 +0000 (22:36 -0400)
sfa/planetlab/plslices.py

index 30cb539..be38155 100644 (file)
@@ -246,7 +246,11 @@ class PlSlices:
         for link in requested_links:
             # get the ip address of the first node in the link
             ifname1 = Xrn(link['interface1']['component_id']).get_leaf()
-            (node_raw, device) = ifname1.split(':')
+            ifname_parts = ifname1.split(':')
+            node_raw = ifname_parts[0]
+            device = None
+            if len(ifname_parts) > 1:
+                device = ifname_parts[1] 
             node_id = int(node_raw.replace('node', ''))
             node = nodes_dict[node_id]
             if1 = interfaces_dict[node['interface_ids'][0]]