git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
623f6de
)
fix NameError
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 1 Jun 2011 17:08:46 +0000
(13:08 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 1 Jun 2011 17:08:46 +0000
(13:08 -0400)
PLC/Methods/UpdateNode.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/UpdateNode.py
b/PLC/Methods/UpdateNode.py
index
2927f73
..
9f94d0a
100644
(file)
--- a/
PLC/Methods/UpdateNode.py
+++ b/
PLC/Methods/UpdateNode.py
@@
-98,8
+98,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)