a little nicer wrt pep8
[sfa.git] / clientbin / sfiAddAttribute.py
index 6fa51b4..7f33681 100755 (executable)
@@ -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())