X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeleteKey.py;h=313c2a4210997b42914a2ea7b955b26f7749003c;hb=ac29a9eebfa173766903dbc8c06c01fc18335bab;hp=3920db3a69343e2350b643ccb69a87958b3a8abd;hpb=23fdd147b1bfb199662e1560fe023e2bebb7a560;p=plcapi.git diff --git a/PLC/Methods/DeleteKey.py b/PLC/Methods/DeleteKey.py index 3920db3..313c2a4 100644 --- a/PLC/Methods/DeleteKey.py +++ b/PLC/Methods/DeleteKey.py @@ -29,7 +29,9 @@ class DeleteKey(Method): if not keys: raise PLCInvalidArgument, "No such key" key = keys[0] - PLCCheckLocalKey(key,"DeleteKey") + + if key['peer_id'] is not None: + raise PLCInvalidArgument, "Not a local key" if 'admin' not in self.caller['roles']: if key['key_id'] not in self.caller['key_ids']: