[elbe-devel] [PATCH] py3: codingstyle fixup for py3 print conversion

Manuel Traut manut at linutronix.de
Mon Dec 18 14:58:09 CET 2017


the conversion to use a function call for print (done with 2to3)
produced some strange results. This fixes it.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/commands/add.py          | 4 ++--
 elbepack/commands/buildchroot.py  | 4 ++--
 elbepack/commands/daemon.py       | 4 ++--
 elbepack/commands/parselicence.py | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/elbepack/commands/add.py b/elbepack/commands/add.py
index 317e007c..16810b3c 100644
--- a/elbepack/commands/add.py
+++ b/elbepack/commands/add.py
@@ -38,14 +38,14 @@ def run_command( argv ):
     try:
         xml = ElbeXML ( args[0] )
     except Exception as e:
-        print(("Error reading xml file: %s" % str(e)))
+        print("Error reading xml file: %s" % str(e))
         sys.exit(20)
 
     for a in args[1:]:
         try:
             xml.add_target_package( a )
         except Exception as e:
-            print(("Error adding package %s: %s" % (a, str(e))))
+            print("Error adding package %s: %s" % (a, str(e)))
             sys.exit(20)
 
     try:
diff --git a/elbepack/commands/buildchroot.py b/elbepack/commands/buildchroot.py
index bc7864bd..19837ea6 100644
--- a/elbepack/commands/buildchroot.py
+++ b/elbepack/commands/buildchroot.py
@@ -102,7 +102,7 @@ def run_command( argv ):
         project = ElbeProject( opt.target, args[0], opt.output, opt.name,
                 opt.buildtype, opt.skip_validation )
     except ValidationError as e:
-        print((str(e)))
+        print(str(e))
         print("xml validation failed. Bailing out")
         sys.exit(20)
 
@@ -111,7 +111,7 @@ def run_command( argv ):
                 opt.build_sources, opt.cdrom_size, opt.debug, opt.skip_pkglist,
                 opt.skip_pbuild )
     except CommandError as ce:
-        print(("command in project build failed: %s" % ce.cmd))
+        print("command in project build failed: %s" % ce.cmd)
         sys.exit(20)
 
     try:
diff --git a/elbepack/commands/daemon.py b/elbepack/commands/daemon.py
index ca137675..6a338aee 100644
--- a/elbepack/commands/daemon.py
+++ b/elbepack/commands/daemon.py
@@ -55,7 +55,7 @@ def run_command( argv ):
             if str(o) == str(d):
                 if getattr(opt,o) == True:
                     active = True
-                    print(("enable %s" % str(d)))
+                    print("enable %s" % str(d))
                     module = "elbepack.daemons." + str(d)
                     mod = __import__(module)
                     cmdmod = sys.modules[module]
@@ -63,7 +63,7 @@ def run_command( argv ):
     if not active:
         print("no daemon activated, use")
         for d in daemons:
-            print(("   --%s" % d))
+            print("   --%s" % d)
         print("to activate at least one daemon")
         return
 
diff --git a/elbepack/commands/parselicence.py b/elbepack/commands/parselicence.py
index e2d78f66..d1ecc2f1 100644
--- a/elbepack/commands/parselicence.py
+++ b/elbepack/commands/parselicence.py
@@ -285,7 +285,7 @@ def run_command( argv ):
 
 
     print("statistics:")
-    print(("num:%d mr:%d hr:%d err_pkg:%d" % (num_pkg, mr, hr, err_pkg)))
+    print("num:%d mr:%d hr:%d err_pkg:%d" % (num_pkg, mr, hr, err_pkg))
 
 
 
-- 
2.15.1




More information about the elbe-devel mailing list