# 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
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'),
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'),
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()