X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=clientbin%2FsfiAddAttribute.py;h=de1b8c583b1964b11204799d5b85073262139c45;hb=f27128bd33db08114f264c4028ae667c962b64c5;hp=6fa51b40c9e1b3cc56f03f2f91caf0d9f32c25c8;hpb=6e46a2373bcda1c1793d18936cc40fb39beb149a;p=sfa.git diff --git a/clientbin/sfiAddAttribute.py b/clientbin/sfiAddAttribute.py index 6fa51b40..de1b8c58 100755 --- a/clientbin/sfiAddAttribute.py +++ b/clientbin/sfiAddAttribute.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import sys @@ -28,20 +28,21 @@ if command.opts.infile: nodes = f.read().split() f.close() - for name in attrs: - print >> sys.stderr, name, attrs[name] + print(name, attrs[name], file=sys.stderr) for value in attrs[name]: if not nodes: try: rspec.version.add_default_sliver_attribute(name, value) except: - logger.log_exc("sfiAddAttribute FAILED on all nodes: %s=%s" % (name, value)) + logger.log_exc( + "sfiAddAttribute FAILED on all nodes: %s=%s" % (name, value)) else: for node in nodes: try: rspec.version.add_sliver_attribute(node, name, value) except: - logger.log_exc ("sfiAddAttribute FAILED on node %s: %s=%s" % (node, name, value)) + logger.log_exc( + "sfiAddAttribute FAILED on node %s: %s=%s" % (node, name, value)) - print rspec.toxml() + print(rspec.toxml())