X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=clientbin%2FsfiAddAttribute.py;h=7f336811ea4fb3b6f99d1e955ffc975b2aa36f63;hp=6fa51b40c9e1b3cc56f03f2f91caf0d9f32c25c8;hb=HEAD;hpb=6e46a2373bcda1c1793d18936cc40fb39beb149a diff --git a/clientbin/sfiAddAttribute.py b/clientbin/sfiAddAttribute.py index 6fa51b40..7f336811 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())