From: Thierry Parmentelat Date: Fri, 23 Feb 2007 16:30:07 +0000 (+0000) Subject: checks for existence of keys before deleting with non-admin users X-Git-Tag: PLCAPI-4.2-0~178 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9c8afbd94fac7c0f0c185eca8a1a4f404baff6d1;p=plcapi.git checks for existence of keys before deleting with non-admin users --- diff --git a/PLC/Methods/UpdateNode.py b/PLC/Methods/UpdateNode.py index b82325e6..28a04131 100644 --- a/PLC/Methods/UpdateNode.py +++ b/PLC/Methods/UpdateNode.py @@ -40,7 +40,8 @@ class UpdateNode(Method): # Remove admin only fields if 'admin' not in self.caller['roles']: for key in 'key', 'session', 'boot_nonce': - del node_fields[key] + if node_fields.has_key(key): + del node_fields[key] # Get account information nodes = Nodes(self.api, [node_id_or_hostname])