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
/
interface.py
diff --git
a/src/nepi/resources/linux/interface.py
b/src/nepi/resources/linux/interface.py
index
7e3d25e
..
04d7959
100644
(file)
--- a/
src/nepi/resources/linux/interface.py
+++ b/
src/nepi/resources/linux/interface.py
@@
-117,7
+117,7
@@
class LinuxInterface(ResourceManager):
if err and proc.poll():
msg = " Error retrieving interface information "
self.error(msg, out, err)
if err and proc.poll():
msg = " Error retrieving interface information "
self.error(msg, out, err)
- raise RuntimeError
, "%s - %s - %s" % (msg, out, err
)
+ raise RuntimeError
("%s - %s - %s" % (msg, out, err)
)
# Check if an interface is found matching the RM attributes
ifaces = out.split("\n\n")
# Check if an interface is found matching the RM attributes
ifaces = out.split("\n\n")
@@
-179,7
+179,7
@@
class LinuxInterface(ResourceManager):
if not self.get("deviceName"):
msg = "Unable to resolve interface "
self.error(msg)
if not self.get("deviceName"):
msg = "Unable to resolve interface "
self.error(msg)
- raise RuntimeError
, msg
+ raise RuntimeError
(msg)
super(LinuxInterface, self).do_discover()
super(LinuxInterface, self).do_discover()
@@
-209,7
+209,7
@@
class LinuxInterface(ResourceManager):
if err and proc.poll():
msg = "Error configuring interface with command '%s'" % cmd
self.error(msg, out, err)
if err and proc.poll():
msg = "Error configuring interface with command '%s'" % cmd
self.error(msg, out, err)
- raise RuntimeError
, "%s - %s - %s" % (msg, out, err
)
+ raise RuntimeError
("%s - %s - %s" % (msg, out, err)
)
if ip6 and mask6:
cmd = "ifconfig %(devname)s inet6 add %(ip6)s/%(mask6)d" % ({
if ip6 and mask6:
cmd = "ifconfig %(devname)s inet6 add %(ip6)s/%(mask6)d" % ({
@@
-222,7
+222,7
@@
class LinuxInterface(ResourceManager):
if err and proc.poll():
msg = "Error seting ipv6 for interface using command '%s' " % cmd
self.error(msg, out, err)
if err and proc.poll():
msg = "Error seting ipv6 for interface using command '%s' " % cmd
self.error(msg, out, err)
- raise RuntimeError
, "%s - %s - %s" % (msg, out, err
)
+ raise RuntimeError
("%s - %s - %s" % (msg, out, err)
)
super(LinuxInterface, self).do_provision()
super(LinuxInterface, self).do_provision()