X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FUpdateNode.py;h=c09e10c9f6b7d309f878f6dd0e10f38ddc46e0f8;hb=bd0cbf4f7f2e4cf7ceda500bfa6f98c0a700018b;hp=2927f73aa9a1834358cc599b92a3d3258b92cb54;hpb=795bc4250d3e357dd141cb541c8313e5de88e86f;p=plcapi.git diff --git a/PLC/Methods/UpdateNode.py b/PLC/Methods/UpdateNode.py index 2927f73..c09e10c 100644 --- a/PLC/Methods/UpdateNode.py +++ b/PLC/Methods/UpdateNode.py @@ -1,5 +1,3 @@ -# $Id$ -# $URL$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -98,8 +96,10 @@ class UpdateNode(Method): for (tagname,value) in tags.iteritems(): # the tagtype instance is assumed to exist, just check that - if not TagTypes(self.api,{'tagname':tagname}): + tag_types = TagTypes(self.api,{'tagname':tagname}) + if not tag_types: raise PLCInvalidArgument,"No such TagType %s"%tagname + tag_type = tag_types[0] node_tags=NodeTags(self.api,{'tagname':tagname,'node_id':node['node_id']}) if not node_tags: node_tag = NodeTag(self.api)