git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
applied the except and raise fixers to the master branch to close the gap with py3
[nepi.git]
/
src
/
nepi
/
resources
/
linux
/
tap.py
diff --git
a/src/nepi/resources/linux/tap.py
b/src/nepi/resources/linux/tap.py
index
9aba916
..
ac11eb0
100644
(file)
--- 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]
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):
@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)
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 ''
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)
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,
# 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)
if err:
msg = " Failed to start command '%s' " % command
self.error(msg, out, err)
- raise RuntimeError
, msg
+ raise RuntimeError
(msg)
return True
return True
@@
-366,7
+366,7
@@
class LinuxTap(LinuxApplication):
if proc.poll():
self.error(msg, out, err)
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(
# 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)
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")
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)
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)
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)
else:
msg = "Couldn't retrieve %s" % filename
self.error(msg, out, err)
- raise RuntimeError
, msg
+ raise RuntimeError
(msg)
return result
return result