applied the except and raise fixers to the master branch to close the gap with py3
[nepi.git] / src / nepi / resources / linux / ns3 / tuntapfdlink.py
index be6f982..3fac31f 100644 (file)
@@ -46,7 +46,7 @@ class LinuxTunTapFdLink(LinuxApplication):
             if not devices or len(devices) != 1: 
                 msg = "TunTapFdLink must be connected to exactly one FdNetDevice"
                 self.error(msg)
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
 
             self._fdnetdevice = devices[0]
         
@@ -69,7 +69,7 @@ class LinuxTunTapFdLink(LinuxApplication):
             if not devices or len(devices) != 1: 
                 msg = "TunTapLink must be connected to exactly one Tap or Tun"
                 self.error(msg)
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
 
             self._tap = devices[0]
         
@@ -106,7 +106,7 @@ class LinuxTunTapFdLink(LinuxApplication):
                 self.fdnode.get("hostname"):
             msg = "Tap and FdNetDevice are not in the same host"
             self.error(msg)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         self.send_address = self.fdnetdevice.recv_fd()
         self.set("command", self._start_command)
@@ -139,7 +139,7 @@ class LinuxTunTapFdLink(LinuxApplication):
         else:
             msg = " Failed to execute command '%s'" % command
             self.error(msg, out, err)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
     @property
     def _start_command(self):