X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Flinux%2Ftap.py;h=ac11eb0aca78f1ed8eb59fdd89a13412a4fde5ea;hp=9aba9164aa4451182930ad4034702407139bc750;hb=6285ca51026efb69642eea9dfc7c480e722d84a9;hpb=cb5d027b813a27d7de263653e1a8e0cef5490f0a diff --git a/src/nepi/resources/linux/tap.py b/src/nepi/resources/linux/tap.py index 9aba9164..ac11eb0a 100644 --- a/src/nepi/resources/linux/tap.py +++ b/src/nepi/resources/linux/tap.py @@ -107,7 +107,7 @@ class LinuxTap(LinuxApplication): def node(self): node = self.get_connected(LinuxNode.get_rtype()) if node: return node[0] - raise RuntimeError, "linux::TAP/TUN devices must be connected to a linux::Node" + raise RuntimeError("linux::TAP/TUN devices must be connected to a linux::Node") @property def gre_enabled(self): @@ -243,7 +243,7 @@ class LinuxTap(LinuxApplication): else: msg = " Failed to execute command '%s'" % command self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) def do_stop(self): command = self.get('command') or '' @@ -315,7 +315,7 @@ class LinuxTap(LinuxApplication): if proc.poll() or err: self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) # Wait for pid file to be generated pid, ppid = self.node.wait_pid(connection_run_home, @@ -331,7 +331,7 @@ class LinuxTap(LinuxApplication): if err: msg = " Failed to start command '%s' " % command self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) return True @@ -366,7 +366,7 @@ class LinuxTap(LinuxApplication): if proc.poll(): self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) # Wait for pid file to be generated self._pid, self._ppid = self.node.wait_pid( @@ -384,7 +384,7 @@ class LinuxTap(LinuxApplication): if err: msg = " Failed to start command '%s' " % command self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) return self.wait_file(connection_run_home, "local_port") @@ -412,7 +412,7 @@ class LinuxTap(LinuxApplication): if proc.poll() and err: msg = " Failed to Kill the Tap" self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) def check_status(self): return self.node.status(self._pid, self._ppid) @@ -433,7 +433,7 @@ class LinuxTap(LinuxApplication): else: msg = "Couldn't retrieve %s" % filename self.error(msg, out, err) - raise RuntimeError, msg + raise RuntimeError(msg) return result