X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fplanetlab%2Fplcapi.py;h=d2970e8c733b461f04c6f0d1010122243266335d;hp=683a4d4a7e876cb54158d442c14b32c04f1f2e6b;hb=6285ca51026efb69642eea9dfc7c480e722d84a9;hpb=cb5d027b813a27d7de263653e1a8e0cef5490f0a diff --git a/src/nepi/resources/planetlab/plcapi.py b/src/nepi/resources/planetlab/plcapi.py index 683a4d4a..d2970e8c 100644 --- a/src/nepi/resources/planetlab/plcapi.py +++ b/src/nepi/resources/planetlab/plcapi.py @@ -212,7 +212,7 @@ class PLCAPI(object): try: # test authorization network_types = _retry(self.mcapi.GetNetworkTypes)(self.auth) - except (xmlrpclib.ProtocolError, xmlrpclib.Fault),e: + except (xmlrpclib.ProtocolError, xmlrpclib.Fault) as e: warnings.warn(str(e)) return True @@ -284,7 +284,7 @@ class PLCAPI(object): * plain : boolean, use plain bootstrapfs image if set (for tests) """ if not isinstance(node, (str, int, long)): - raise ValueError, "Node must be either a non-unicode string or an int" + raise ValueError("Node must be either a non-unicode string or an int") return _retry(self.mcapi.GetNodeFlavour)(self.auth, node) def get_nodes(self, node_id_or_name = None, fields = None, **kw):