File Fix-code-to-be-python3-compliant.patch of Package adios.24691

From: Egbert Eich <eich@suse.com>
Date: Tue Feb 16 17:12:05 2021 +0100
Subject: Fix code to be python3 compliant.
Patch-mainline: Not yet
Git-commit: e4995f3c040a8bcb99f84c47a4c1d09b12de484d
References: u

Signed-off-by: Egbert Eich <eich@suse.com>
---
 utils/skel/bin/skel            | 8 ++++----
 utils/skel/bin/skel_extract.py | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/utils/skel/bin/skel b/utils/skel/bin/skel
index 9e37214..f74c73c 100755
--- a/utils/skel/bin/skel
+++ b/utils/skel/bin/skel
@@ -58,7 +58,7 @@ def main(argv=None):
 
     # Look for skel help (or no args), and print the list of subcommands...
     if (len(sys.argv) == 1) or (sys.argv[1] == 'help' and len(sys.argv) == 2):
-        print parser.description 
+        print (parser.description)
         return 0
 
     # install does not require a project, so let's just check for it directly
@@ -83,8 +83,8 @@ def main(argv=None):
         elif sys.argv[2] == 'xml':
             sys.argv = ["skel", "xml", "junk", "-h"]
         else:
-            print "Unknown help topic" 
-            print parser.description 
+            print ("Unknown help topic")
+            print (parser.description)
             exit(1)
 
     #args = parse_command_line()
@@ -154,7 +154,7 @@ def main(argv=None):
         return 0
 
     # Unrecognized subcommand, print the help message
-    print parser.description
+    print (parser.description)
     return 0
 
 
diff --git a/utils/skel/bin/skel_extract.py b/utils/skel/bin/skel_extract.py
index 54bfaf5..8a7c755 100755
--- a/utils/skel/bin/skel_extract.py
+++ b/utils/skel/bin/skel_extract.py
@@ -46,7 +46,7 @@ def extract (skel_output, dest, select, ranks):
     # check the selected fields
     for field in selected_fields:
         if not field in keys:
-            print 'Invalid selection, field ' + field
+            print ('Invalid selection, field ' + field)
             return
 
     #Print the header
@@ -112,7 +112,7 @@ def extract_R (skel_output, select, ranks, iteration):
     # check the selected fields
     for field in selected_fields:
         if not field in keys:
-            print 'Invalid selection, field ' + field
+            print ('Invalid selection, field ' + field)
             return
 
     #Print the header
@@ -153,13 +153,13 @@ def extract_R (skel_output, select, ranks, iteration):
 def parse_iteration (filename):
     #assume filename ends with .xml
     if not filename.endswith (".xml"):
-        print "Warning: filename does not meet expectations, should end with .xml"
+        print ("Warning: filename does not meet expectations, should end with .xml")
 
     filename = filename [:-4]
 
     iteration = filename.rsplit ("_", 1)[1]
 
-    print iteration
+    print (iteration)
 
     return iteration
 
openSUSE Build Service is sponsored by