applied the except and raise fixers to the master branch to close the gap with py3
[nepi.git] / src / nepi / resources / planetlab / tap.py
index 73c5df7..56517c3 100644 (file)
@@ -50,7 +50,7 @@ class PlanetlabTap(LinuxTap):
     def node(self):
         node = self.get_connected(PlanetlabNode.get_rtype())
         if node: return node[0]
-        raise RuntimeError, "TAP/TUN devices must be connected to Node"
+        raise RuntimeError("TAP/TUN devices must be connected to Node")
 
     def upload_sources(self):
         scripts = []
@@ -140,7 +140,7 @@ class PlanetlabTap(LinuxTap):
                 (out, err), proc = self.node.check_errors(exec_run_home)
                 
                 if err.strip():
-                    raise RuntimeError, err
+                    raise RuntimeError(err)
 
             if out:
                 vif_name = out.strip()
@@ -151,7 +151,7 @@ class PlanetlabTap(LinuxTap):
         else:
             msg = "Couldn't retrieve vif_name"
             self.error(msg, out, err)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         return vif_name