X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeleteInterface.py;h=2747e46c9af3bd6e96350ae03ed3657558d13383;hb=3b44c0228c26dc43d985185afc225caa5f48c1fb;hp=229a0d7533b55f19e9c3e38c8e1872cc5adc914c;hpb=997c5bbe5b0576ae8c9c8d52a80dab1dcecf615a;p=plcapi.git diff --git a/PLC/Methods/DeleteInterface.py b/PLC/Methods/DeleteInterface.py index 229a0d7..2747e46 100644 --- a/PLC/Methods/DeleteInterface.py +++ b/PLC/Methods/DeleteInterface.py @@ -30,13 +30,13 @@ class DeleteInterface(Method): # Get interface information interfaces = Interfaces(self.api, [interface_id]) if not interfaces: - raise PLCInvalidArgument, "No such interface %r"%interface_id + raise PLCInvalidArgument("No such interface %r"%interface_id) interface = interfaces[0] # Get node information nodes = Nodes(self.api, [interface['node_id']]) if not nodes: - raise PLCInvalidArgument, "No such node %r"%node_id + raise PLCInvalidArgument("No such node %r"%node_id) node = nodes[0] # Authenticated functino @@ -46,7 +46,7 @@ class DeleteInterface(Method): # member of the site at which the node is located. if 'admin' not in self.caller['roles']: if node['site_id'] not in self.caller['site_ids']: - raise PLCPermissionDenied, "Not allowed to delete this interface" + raise PLCPermissionDenied("Not allowed to delete this interface") interface.delete()