- added logging variable 'object_type'
[plcapi.git] / PLC / Methods / UpdateNode.py
index 9fa5259..b82325e 100644 (file)
@@ -32,6 +32,8 @@ class UpdateNode(Method):
 
     returns = Parameter(int, '1 if successful')
 
+    object_type = 'Node'
+
     def call(self, auth, node_id_or_hostname, node_fields):
         node_fields = dict(filter(can_update, node_fields.items()))
 
@@ -44,9 +46,10 @@ class UpdateNode(Method):
         nodes = Nodes(self.api, [node_id_or_hostname])
         if not nodes:
             raise PLCInvalidArgument, "No such node"
-
         node = nodes[0]
-       PLCCheckLocalNode(node,"UpdateNode")
+
+        if node['peer_id'] is not None:
+            raise PLCInvalidArgument, "Not a local node"
 
         # Authenticated function
         assert self.caller is not None