X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fplanetlab%2Fopenvswitch%2Fovsport.py;h=9db4885505da668aea94c32e3881d8187f01b50c;hb=6285ca51026efb69642eea9dfc7c480e722d84a9;hp=25f7c03db17f425a97dc4d77ec61c652a015154e;hpb=00be6a6a023debb382d6d351cf005b233da20623;p=nepi.git diff --git a/src/nepi/resources/planetlab/openvswitch/ovsport.py b/src/nepi/resources/planetlab/openvswitch/ovsport.py index 25f7c03d..9db48855 100644 --- a/src/nepi/resources/planetlab/openvswitch/ovsport.py +++ b/src/nepi/resources/planetlab/openvswitch/ovsport.py @@ -3,9 +3,8 @@ # Copyright (C) 2013 INRIA # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -117,12 +116,12 @@ class PlanetlabOVSPort(LinuxApplication): if not self.get('port_name'): msg = "The port name is not assigned" self.error(msg) - raise AttributeError, msg + raise AttributeError(msg) if not self.ovsswitch: msg = "The OVSwitch RM is not running" self.error(msg) - raise AttributeError, msg + raise AttributeError(msg) command = "sliver-ovs create-port %s %s" % ( self.ovsswitch.get('bridge_name'), @@ -140,7 +139,7 @@ class PlanetlabOVSPort(LinuxApplication): except RuntimeError: msg = "Could not create ovs-port" self.debug(msg) - raise RuntimeError, msg + raise RuntimeError(msg) self.info("Created port %s on switch %s" % ( self.get('port_name'), @@ -168,7 +167,7 @@ class PlanetlabOVSPort(LinuxApplication): if err != "": msg = "Error retrieving the local endpoint of the port" self.error(msg) - raise RuntimeError, msg + raise RuntimeError(msg) if out: self._port_number = out.strip()