still making both branches closer
[nepi.git] / src / nepi / resources / omf / wilabt_node.py
index 41d4664..8ce3e21 100644 (file)
@@ -393,7 +393,7 @@ class WilabtSfaNode(OMFNode):
         attribute hostname, it will over write the previous value.
         """
         hosts_hrn = self.sfaapi.get_resources_hrn()
-        for host, hrn  in hosts_hrn.iteritems():
+        for host, hrn  in hosts_hrn.items():
             if hrn == node:
                 host = host + '.wilab2.ilabt.iminds.be'
                 self.set("host", host)
@@ -444,23 +444,23 @@ class WilabtSfaNode(OMFNode):
     def fail_discovery(self):
         msg = "Discovery failed. No candidates found for node"
         self.error(msg)
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
 
     def fail_node_not_alive(self, host=None):
         msg = "Node %s not alive" % host
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
     
     def fail_node_not_available(self, host):
         msg = "Some nodes not available for provisioning"
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
 
     def fail_not_enough_nodes(self):
         msg = "Not enough nodes available for provisioning"
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
 
     def fail_sfaapi(self):
         msg = "Failing while trying to instanciate the SFA API."
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
 
     def valid_connection(self, guid):
         # TODO: Validate!