a first very rough step towards python3
[nepi.git] / src / nepi / resources / planetlab / node.py
index fe7f058..ea2b9b9 100644 (file)
@@ -428,7 +428,7 @@ class PlanetlabNode(LinuxNode):
         nodes_id = []
         filters = {}
 
-        for attr_name, attr_obj in self._attrs.iteritems():
+        for attr_name, attr_obj in self._attrs.items():
             attr_value = self.get(attr_name)
             
             if attr_value is not None and attr_obj.has_flag(Flags.Filter) and \
@@ -659,24 +659,24 @@ class PlanetlabNode(LinuxNode):
     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, hostname=None):
         msg = "Node %s not alive" % hostname
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
     
     def fail_node_not_available(self, hostname):
         msg = "Node %s not available for provisioning" % hostname
-        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_plapi(self):
         msg = "Failing while trying to instanciate the PLC API.\nSet the" + \
             " attributes pluser and plpassword."
-        raise RuntimeError, msg
+        raise RuntimeError(msg)
 
     def valid_connection(self, guid):
         # TODO: Validate!