[elbe-devel] [PATCH 23/25] codingstyle: use same coding style for print()

Manuel Traut manut at linutronix.de
Mon Dec 11 10:11:17 CET 2017


some elbe code used already the print() as function via __future__
import, but the coding style was different than in other files.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/commands/initvm.py   |   8 +-
 elbepack/commands/mkcdrom.py  |  16 +--
 elbepack/commands/pbuilder.py |   8 +-
 elbepack/commands/prjrepo.py  |  40 ++++----
 elbepack/debianize/uboot.py   |   2 +-
 elbepack/initvmaction.py      | 224 +++++++++++++++++++++---------------------
 elbepack/pbuilderaction.py    | 152 ++++++++++++++--------------
 elbepack/rfs.py               |   2 +-
 elbepack/soapclient.py        |  88 ++++++++---------
 9 files changed, 270 insertions(+), 270 deletions(-)

diff --git a/elbepack/commands/initvm.py b/elbepack/commands/initvm.py
index 5d8185d7..d77708f2 100755
--- a/elbepack/commands/initvm.py
+++ b/elbepack/commands/initvm.py
@@ -66,7 +66,7 @@ def run_command (argv):
     (opt,args) = oparser.parse_args (argv)
 
     if len(args) < 1:
-        print ('elbe initvm - no subcommand given', file=sys.stderr)
+        print("elbe initvm - no subcommand given", file=sys.stderr)
         InitVMAction.print_actions ()
         sys.exit(20)
 
@@ -78,13 +78,13 @@ def run_command (argv):
     try:
         action = InitVMAction (args[0])
     except KeyError:
-        print ('elbe initvm - unknown subcommand', file=sys.stderr)
+        print("elbe initvm - unknown subcommand", file=sys.stderr)
         InitVMAction.print_actions ()
         sys.exit(20)
 
     try:
         action.execute (directory, opt, args[1:])
     except InitVMError as e:
-        print ('InitVM Exception', file=sys.stderr)
-        print (e, file=sys.stderr)
+        print("InitVM Exception", file=sys.stderr)
+        print(e, file=sys.stderr)
         sys.exit(5)
diff --git a/elbepack/commands/mkcdrom.py b/elbepack/commands/mkcdrom.py
index 92748134..fb20e7ec 100644
--- a/elbepack/commands/mkcdrom.py
+++ b/elbepack/commands/mkcdrom.py
@@ -61,7 +61,7 @@ def run_command( argv ):
     (opt,args) = oparser.parse_args(argv)
 
     if len(args) != 1:
-        print ("wrong number of arguments", file=sys.stderr)
+        print("wrong number of arguments", file=sys.stderr)
         oparser.print_help()
         sys.exit(20)
 
@@ -71,8 +71,8 @@ def run_command( argv ):
                     override_buildtype=opt.buildtype,
                     skip_validate=opt.skip_validation )
         except ValidationError as e:
-            print (str (e), file=sys.stderr)
-            print ("xml validation failed. Bailing out", file=sys.stderr)
+            print(str (e), file=sys.stderr)
+            print("xml validation failed. Bailing out", file=sys.stderr)
             sys.exit(20)
 
         builddir = project.builddir
@@ -107,10 +107,10 @@ def run_command( argv ):
                                                 init_codename, xml, builddir, log,
                     opt.cdrom_size )
 
-    print ("")
-    print ("Image Build finished !")
-    print ("")
-    print ("Files generated:")
+    print("")
+    print("Image Build finished !")
+    print("")
+    print("Files generated:")
     for f in generated_files:
-        print (" %s"%f)
+        print(" %s"%f)
 
diff --git a/elbepack/commands/pbuilder.py b/elbepack/commands/pbuilder.py
index eaa50f7d..2a5a547a 100755
--- a/elbepack/commands/pbuilder.py
+++ b/elbepack/commands/pbuilder.py
@@ -49,20 +49,20 @@ def run_command (argv):
     (opt,args) = oparser.parse_args (argv)
 
     if len(args) < 1:
-        print ('elbe pbuilder - no subcommand given', file=sys.stderr)
+        print("elbe pbuilder - no subcommand given", file=sys.stderr)
         PBuilderAction.print_actions ()
         return
 
     try:
         action = PBuilderAction (args[0])
     except KeyError:
-        print ('elbe pbuilder - unknown subcommand', file=sys.stderr)
+        print("elbe pbuilder - unknown subcommand", file=sys.stderr)
         PBuilderAction.print_actions ()
         sys.exit(20)
 
     try:
         action.execute (opt, args[1:])
     except PBuilderError as e:
-        print ('PBuilder Exception', file=sys.stderr)
-        print (e, file=sys.stderr)
+        print("PBuilder Exception", file=sys.stderr)
+        print(e, file=sys.stderr)
         sys.exit(5)
diff --git a/elbepack/commands/prjrepo.py b/elbepack/commands/prjrepo.py
index 4c979151..049fbbf9 100755
--- a/elbepack/commands/prjrepo.py
+++ b/elbepack/commands/prjrepo.py
@@ -79,7 +79,7 @@ def run_command(argv):
     (opt, args) = oparser.parse_args(argv)
 
     if len(args) < 1:
-        print ('elbe prjrepo - no subcommand given', file=sys.stderr)
+        print("elbe prjrepo - no subcommand given", file=sys.stderr)
         RepoAction.print_actions()
         return
 
@@ -94,27 +94,27 @@ def run_command(argv):
             retries=int(
                 opt.retries))
     except socket.error as e:
-        print ("Failed to connect to Soap server %s:%s\n" %
+        print("Failed to connect to Soap server %s:%s\n" %
                (opt.host, opt.port), file=sys.stderr)
-        print ("", file=sys.stderr)
-        print (
+        print("", file=sys.stderr)
+        print(
             "Check, wether the Soap Server is running inside the initvm",
             file=sys.stderr)
-        print ("try 'elbe initvm attach'", file=sys.stderr)
+        print("try 'elbe initvm attach'", file=sys.stderr)
         sys.exit(10)
     except URLError as e:
-        print ("Failed to connect to Soap server %s:%s\n" %
+        print("Failed to connect to Soap server %s:%s\n" %
                (opt.host, opt.port), file=sys.stderr)
-        print ("", file=sys.stderr)
-        print ("Check, wether the initvm is actually running.", file=sys.stderr)
-        print ( "try `elbe initvm start`", file=sys.stderr)
+        print("", file=sys.stderr)
+        print("Check, wether the initvm is actually running.", file=sys.stderr)
+        print( "try `elbe initvm start`", file=sys.stderr)
         sys.exit(10)
     except BadStatusLine as e:
-        print ("Failed to connect to Soap server %s:%s\n" %
+        print("Failed to connect to Soap server %s:%s\n" %
                (opt.host, opt.port), file=sys.stderr)
-        print ("", file=sys.stderr)
-        print ("Check, wether the initvm is actually running.", file=sys.stderr)
-        print (
+        print("", file=sys.stderr)
+        print("Check, wether the initvm is actually running.", file=sys.stderr)
+        print(
             "try 'elbe initvm --directory /path/to/initvm start'",
             file=sys.stderr)
         sys.exit(10)
@@ -123,13 +123,13 @@ def run_command(argv):
     try:
         v_server = control.service.get_version ()
         if v_server != elbe_version:
-            print ("elbe v%s is used in initvm, this is not compatible with \
+            print("elbe v%s is used in initvm, this is not compatible with \
 elbe v%s that is used on this machine. Please install same \
 versions of elbe in initvm and on your machine." % (v_server, elbe_version), file=sys.stderr)
             if not (opt.ignore_version):
                 sys.exit (20)
     except AttributeError:
-        print ("the elbe installation inside the initvm doesn't provide a \
+        print("the elbe installation inside the initvm doesn't provide a \
 get_version interface. Please create a new initvm or upgrade \
 elbe inside the existing initvm.", file=sys.stderr)
         if not (opt.ignore_version):
@@ -139,7 +139,7 @@ elbe inside the existing initvm.", file=sys.stderr)
     try:
         action = RepoAction(args[0])
     except KeyError:
-        print ('elbe prjrepo - unknown subcommand', file=sys.stderr)
+        print("elbe prjrepo - unknown subcommand", file=sys.stderr)
         RepoAction.print_actions()
         sys.exit(20)
 
@@ -147,10 +147,10 @@ elbe inside the existing initvm.", file=sys.stderr)
     try:
         action.execute(control, opt, args[1:])
     except WebFault as e:
-        print ('Server returned error:', file=sys.stderr)
-        print ('', file=sys.stderr)
+        print("Server returned an error:", file=sys.stderr)
+        print("", file=sys.stderr)
         if hasattr(e.fault, 'faultstring'):
-            print (e.fault.faultstring, file=sys.stderr)
+            print(e.fault.faultstring, file=sys.stderr)
         else:
-            print (e, file=sys.stderr)
+            print(e, file=sys.stderr)
         sys.exit(5)
diff --git a/elbepack/debianize/uboot.py b/elbepack/debianize/uboot.py
index bd188651..65c30986 100644
--- a/elbepack/debianize/uboot.py
+++ b/elbepack/debianize/uboot.py
@@ -30,7 +30,7 @@ class UBoot (DebianizeBase):
     files = ['Kbuild', 'Kconfig', 'MAINTAINERS', 'config.mk']
 
     def __init__ (self):
-        print ("debianization of uboot is not supported at the moment")
+        print("debianization of uboot is not supported at the moment")
         sys.exit (-2)
         DebianizeBase.__init__ (self)
 
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 41dc2d41..12bb3b54 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -44,7 +44,7 @@ def ensure_outdir (wdfs, opt):
     if opt.outdir is None:
         opt.outdir = "elbe-build-" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
 
-    print ("Saving generated Files to %s" % opt.outdir)
+    print("Saving generated Files to %s" % opt.outdir)
 
 def ensure_initvm_defined():
     if self.initvm == None:
@@ -61,9 +61,9 @@ class InitVMAction(object):
         cls.actiondict[action.tag] = action
     @classmethod
     def print_actions(cls):
-        print ('available subcommands are:', file=sys.stderr)
+        print("available subcommands are:", file=sys.stderr)
         for a in cls.actiondict:
-            print ('   ' + a, file=sys.stderr)
+            print("   %s" % a, file=sys.stderr)
     def __new__(cls, node):
         action = cls.actiondict[node]
         return object.__new__(action)
@@ -101,7 +101,7 @@ class StartAction(InitVMAction):
                 sys.stdout.write ("*")
                 sys.stdout.flush ()
                 time.sleep (1)
-            print ("*")
+            print("*")
 
 InitVMAction.register(StartAction)
 
@@ -177,11 +177,11 @@ class StartBuildAction(InitVMAction):
         try:
             have_session = os.system( "tmux has-session -t ElbeInitVMSession >/dev/null 2>&1" )
         except CommandError as e:
-            print ("tmux execution failed, tmux version 1.9 or higher is required")
+            print("tmux execution failed, tmux version 1.9 or higher is required")
             sys.exit(20)
         if have_session != 256:
-            print ("ElbeInitVMSession already exists in tmux.", file=sys.stderr)
-            print ("Try 'elbe initvm attach' to attach to the session.", file=sys.stderr)
+            print("ElbeInitVMSession already exists in tmux.", file=sys.stderr)
+            print("Try 'elbe initvm attach' to attach to the session.", file=sys.stderr)
             sys.exit(20)
 
         system( 'TMUX= tmux new-session -d -s ElbeInitVMSession -n initvm "cd \"%s\"; make"' % initvmdir )
@@ -216,7 +216,7 @@ class CreateAction(InitVMAction):
                 try:
                     xml = etree( xmlfile )
                 except ValidationError as e:
-                    print ('XML file is inavlid: ' + str(e))
+                    print("XML file is inavlid: %s" % str(e))
                 # Use default XML if no initvm was specified
                 if not xml.has( "initvm" ):
                     xmlfile = os.path.join (elbepack.__path__[0], "init/default-init.xml")
@@ -229,34 +229,34 @@ class CreateAction(InitVMAction):
                 print ('', file=sys.stderr)
 
                 if not tmp.isfile ('source.xml'):
-                    print ('Iso image does not contain a source.xml file', file=sys.stderr)
-                    print ('This is not supported by "elbe initvm"', file=sys.stderr)
-                    print ('', file=sys.stderr)
-                    print ('Exiting !!!', file=sys.stderr)
+                    print("Iso image does not contain a source.xml file", file=sys.stderr)
+                    print("This is not supported by 'elbe initvm'", file=sys.stderr)
+                    print("", file=sys.stderr)
+                    print("Exiting !!!", file=sys.stderr)
                     sys.exit (20)
 
                 try:
                     exml = ElbeXML (tmp.fname ('source.xml'), url_validation=ValidationMode.NO_CHECK)
                 except ValidationError as e:
-                    print ('Iso image does contain a source.xml file.', file=sys.stderr)
-                    print ('But that xml does not validate correctly', file=sys.stderr)
-                    print ('', file=sys.stderr)
-                    print ('Exiting !!!', file=sys.stderr)
-                    print (e)
+                    print("Iso image does contain a source.xml file.", file=sys.stderr)
+                    print("But that xml does not validate correctly", file=sys.stderr)
+                    print("", file=sys.stderr)
+                    print("Exiting !!!", file=sys.stderr)
+                    print(e)
                     sys.exit (20)
 
-                print ('Iso Image with valid source.xml detected !')
-                print ('Image was generated using Elbe Version %s' % exml.get_elbe_version ())
+                print("Iso Image with valid source.xml detected !")
+                print("Image was generated using Elbe Version %s" % exml.get_elbe_version ())
 
                 os.system ('7z x -o%s "%s" elbe-keyring.gpg' % ('/tmp', args[0]))
 
                 if tmp.isfile ('elbe-keyring.gpg'):
-                    print ('Iso image contains a elbe-kerying')
+                    print("Iso image contains a elbe-kerying")
 
                 xmlfile = tmp.fname ('source.xml')
                 cdrom = args[0]
             else:
-                print ('Unknown file ending (use either xml or iso)', file=sys.stderr)
+                print("Unknown file ending (use either xml or iso)", file=sys.stderr)
                 sys.exit (20)
         else:
             # No xml File was specified, build the default elbe-init-with-ssh
@@ -276,8 +276,8 @@ class CreateAction(InitVMAction):
                 system ('%s init %s --directory "%s" "%s"' % (elbe_exe, init_opts, initvmdir, xmlfile))
 
         except CommandError:
-            print ("'elbe init' Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("'elbe init' Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
         # Register initvm in libvirt
@@ -303,15 +303,15 @@ class CreateAction(InitVMAction):
         try:
             system ('cd "%s"; make' % (initvmdir))
         except CommandError:
-            print ("Building the initvm Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("Building the initvm Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
         try:
             system('%s initvm start' % elbe_exe)
         except CommandError:
-            print ("Starting the initvm Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("Starting the initvm Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
         if len(args) == 1:
@@ -322,10 +322,10 @@ class CreateAction(InitVMAction):
                 try:
                     x = ElbeXML (args[0])
                 except ValidationError as e:
-                    print ('XML file is inavlid: ' + str(e))
+                    print("XML file is inavlid: %s" % str(e))
                     sys.exit(20)
                 if not x.has('project'):
-                    print ('elbe initvm ready: use "elbe initvm submit myproject.xml" to build a project');
+                    print("elbe initvm ready: use 'elbe initvm submit myproject.xml' to build a project");
                     sys.exit(0)
 
                 ret, prjdir, err = command_out_stderr ('%s control create_project' % (elbe_exe))
@@ -337,9 +337,9 @@ class CreateAction(InitVMAction):
                 ret, prjdir, err = command_out_stderr ('%s control create_project' % (elbe_exe))
 
             if ret != 0:
-                print ("elbe control create_project failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control create_project failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             prjdir = prjdir.strip()
@@ -347,9 +347,9 @@ class CreateAction(InitVMAction):
             cmd = '%s control set_xml %s %s' % (elbe_exe, prjdir, xmlfile)
             ret, msg, err = command_out_stderr (cmd)
             if ret != 0:
-                print ("elbe control set_xml failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control set_xml failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             if opt.writeproject:
@@ -357,15 +357,15 @@ class CreateAction(InitVMAction):
                     wpf.write (prjdir)
 
             if cdrom is not None:
-                print ("Uploading CDROM. This might take a while")
+                print("Uploading CDROM. This might take a while")
                 try:
                     system ('%s control set_cdrom "%s" "%s"' % (elbe_exe, prjdir, cdrom) )
                 except CommandError:
-                    print ("elbe control set_cdrom Failed", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control set_cdrom Failed", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                     sys.exit(20)
 
-                print ("Upload finished")
+                print("Upload finished")
 
             build_opts = ''
             if opt.build_bin:
@@ -378,8 +378,8 @@ class CreateAction(InitVMAction):
             try:
                 system ('%s control build "%s" %s' % (elbe_exe, prjdir, build_opts) )
             except CommandError:
-                print ("elbe control build Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control build Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             print ("Build started, waiting till it finishes")
@@ -387,39 +387,39 @@ class CreateAction(InitVMAction):
             try:
                 system ('%s control wait_busy "%s"' % (elbe_exe, prjdir) )
             except CommandError:
-                print ("elbe control wait_busy Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control wait_busy Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
-            print ("")
-            print ("Build finished !")
-            print ("")
+            print("")
+            print("Build finished !")
+            print("")
             try:
                 system ('%s control dump_file "%s" validation.txt' % (elbe_exe, prjdir) )
             except CommandError:
-                print ("Project failed to generate validation.txt", file=sys.stderr)
-                print ("Getting log.txt", file=sys.stderr)
+                print("Project failed to generate validation.txt", file=sys.stderr)
+                print("Getting log.txt", file=sys.stderr)
                 try:
                     system ('%s control dump_file "%s" log.txt' % (elbe_exe, prjdir) )
                 except CommandError:
 
-                    print ("Failed to dump log.txt", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("Failed to dump log.txt", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             if opt.skip_download:
-                print ("")
-                print ("Listing available files:")
-                print ("")
+                print("")
+                print("Listing available files:")
+                print("")
                 try:
                     system ('%s control get_files "%s"' % (elbe_exe, prjdir) )
                 except CommandError:
-                    print ("elbe control get_files Failed", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control Failed", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                     sys.exit(20)
 
-                print ("")
-                print ('Get Files with: elbe control get_file "%s" <filename>' % prjdir)
+                print("")
+                print('Get Files with: elbe control get_file "%s" <filename>' % prjdir)
             else:
                 print ("")
                 print ("Getting generated Files")
@@ -431,8 +431,8 @@ class CreateAction(InitVMAction):
                     system ('%s control get_files --output "%s" "%s"' % (
                             elbe_exe, opt.outdir, prjdir ))
                 except CommandError:
-                    print ("elbe control get_files Failed", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control get_files Failed", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                     sys.exit(20)
 
                 if not opt.keep_files:
@@ -457,8 +457,8 @@ class SubmitAction(InitVMAction):
         try:
             system ('%s initvm ensure' % elbe_exe)
         except CommandError:
-            print ("Starting the initvm Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("Starting the initvm Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
         # Init cdrom to None, if we detect it, we set it
@@ -474,50 +474,50 @@ class SubmitAction(InitVMAction):
                 tmp = TmpdirFilesystem ()
                 os.system ('7z x -o%s "%s" source.xml' % (tmp.path, args[0]))
 
-                print ('', file=sys.stderr)
+                print("", file=sys.stderr)
 
                 if not tmp.isfile ('source.xml'):
-                    print ('Iso image does not contain a source.xml file', file=sys.stderr)
-                    print ('This is not supported by "elbe initvm"', file=sys.stderr)
-                    print ('', file=sys.stderr)
-                    print ('Exiting !!!', file=sys.stderr)
+                    print("Iso image does not contain a source.xml file", file=sys.stderr)
+                    print("This is not supported by 'elbe initvm'", file=sys.stderr)
+                    print("", file=sys.stderr)
+                    print("Exiting !!!", file=sys.stderr)
                     sys.exit (20)
 
                 try:
                     exml = ElbeXML (tmp.fname ('source.xml'), url_validation=ValidationMode.NO_CHECK)
                 except ValidationError as e:
-                    print ('Iso image does contain a source.xml file.', file=sys.stderr)
-                    print ('But that xml does not validate correctly', file=sys.stderr)
-                    print ('', file=sys.stderr)
-                    print ('Exiting !!!', file=sys.stderr)
-                    print (e)
+                    print("Iso image does contain a source.xml file.", file=sys.stderr)
+                    print("But that xml does not validate correctly", file=sys.stderr)
+                    print("", file=sys.stderr)
+                    print("Exiting !!!", file=sys.stderr)
+                    print(e)
                     sys.exit (20)
 
-                print ('Iso Image with valid source.xml detected !')
-                print ('Image was generated using Elbe Version %s' % exml.get_elbe_version ())
+                print("Iso Image with valid source.xml detected !")
+                print("Image was generated using Elbe Version %s" % exml.get_elbe_version ())
 
                 xmlfile = tmp.fname ('source.xml')
                 url_validation = '--skip-urlcheck'
                 cdrom = args[0]
             else:
-                print ('Unknown file ending (use either xml or iso)', file=sys.stderr)
+                print("Unknown file ending (use either xml or iso)", file=sys.stderr)
                 sys.exit (20)
 
             outxml = NamedTemporaryFile(prefix='elbe', suffix='xml')
             cmd = '%s preprocess -o %s %s' % (elbe_exe, outxml.name, xmlfile)
             ret, msg, err = command_out_stderr (cmd)
             if ret != 0:
-                print ("elbe preprocess failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe preprocess failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
             xmlfile = outxml.name
 
             ret, prjdir, err = command_out_stderr ('%s control create_project' % (elbe_exe))
             if ret != 0:
-                print ("elbe control create_project failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control create_project failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             prjdir = prjdir.strip()
@@ -525,9 +525,9 @@ class SubmitAction(InitVMAction):
             cmd = '%s control set_xml %s %s' % (elbe_exe, prjdir, xmlfile)
             ret, msg, err = command_out_stderr (cmd)
             if ret != 0:
-                print ("elbe control set_xml failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control set_xml failed2", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             if opt.writeproject:
@@ -535,15 +535,15 @@ class SubmitAction(InitVMAction):
                     wpf.write (prjdir)
 
             if cdrom is not None:
-                print ("Uploading CDROM. This might take a while")
+                print("Uploading CDROM. This might take a while")
                 try:
                     system ('%s control set_cdrom "%s" "%s"' % (elbe_exe, prjdir, cdrom) )
                 except CommandError:
-                    print ("elbe control set_cdrom Failed", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control set_cdrom Failed", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                     sys.exit(20)
 
-                print ("Upload finished")
+                print("Upload finished")
 
             build_opts = ''
             if opt.build_bin:
@@ -556,52 +556,52 @@ class SubmitAction(InitVMAction):
             try:
                 system ('%s control build "%s" %s' % (elbe_exe, prjdir, build_opts) )
             except CommandError:
-                print ("elbe control build Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control build Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
-            print ("Build started, waiting till it finishes")
+            print("Build started, waiting till it finishes")
 
             try:
                 system ('%s control wait_busy "%s"' % (elbe_exe, prjdir) )
             except CommandError:
-                print ("elbe control wait_busy Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control wait_busy Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
-            print ("")
-            print ("Build finished !")
-            print ("")
+            print("")
+            print("Build finished !")
+            print("")
             try:
                 system ('%s control dump_file "%s" validation.txt' % (elbe_exe, prjdir) )
             except CommandError:
-                print ("Project failed to generate validation.txt", file=sys.stderr)
-                print ("Getting log.txt", file=sys.stderr)
+                print("Project failed to generate validation.txt", file=sys.stderr)
+                print("Getting log.txt", file=sys.stderr)
                 try:
                     system ('%s control dump_file "%s" log.txt' % (elbe_exe, prjdir) )
                 except CommandError:
 
-                    print ("Failed to dump log.txt", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("Failed to dump log.txt", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             if opt.skip_download:
-                print ("")
-                print ("Listing available files:")
-                print ("")
+                print("")
+                print("Listing available files:")
+                print("")
                 try:
                     system ('%s control get_files "%s"' % (elbe_exe, prjdir) )
                 except CommandError:
-                    print ("elbe control get_files Failed", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control get_files Failed", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                     sys.exit(20)
 
-                print ("")
-                print ('Get Files with: elbe control get_file "%s" <filename>' % prjdir)
+                print("")
+                print('Get Files with: elbe control get_file "%s" <filename>' % prjdir)
             else:
-                print ("")
-                print ("Getting generated Files")
-                print ("")
+                print("")
+                print("Getting generated Files")
+                print("")
 
                 ensure_outdir (wdfs, opt)
 
@@ -609,8 +609,8 @@ class SubmitAction(InitVMAction):
                     system ('%s control get_files --output "%s" "%s"' % (
                             elbe_exe, opt.outdir, prjdir ))
                 except CommandError:
-                    print ("elbe control get_files Failed", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control get_files Failed", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
                     sys.exit(20)
 
                 if not opt.keep_files:
@@ -618,7 +618,7 @@ class SubmitAction(InitVMAction):
                         system ('%s control del_project "%s"' % (
                             elbe_exe, prjdir))
                     except CommandError:
-                        print ("remove project from initvm failed",
+                        print("remove project from initvm failed",
                                 file=sys.stderr)
                         sys.exit(20)
 
diff --git a/elbepack/pbuilderaction.py b/elbepack/pbuilderaction.py
index 0b864a9f..53963931 100644
--- a/elbepack/pbuilderaction.py
+++ b/elbepack/pbuilderaction.py
@@ -35,7 +35,7 @@ def ensure_outdir (wdfs, opt):
     if opt.outdir is None:
         opt.outdir = ".."
 
-    print ("Saving generated Files to %s" % opt.outdir)
+    print("Saving generated Files to %s" % opt.outdir)
 
 class PBuilderError(Exception):
     def __init__(self, str):
@@ -48,9 +48,9 @@ class PBuilderAction(object):
         cls.actiondict[action.tag] = action
     @classmethod
     def print_actions(cls):
-        print ('available subcommands are:', file=sys.stderr)
+        print("available subcommands are:", file=sys.stderr)
         for a in cls.actiondict:
-            print ('   ' + a, file=sys.stderr)
+            print("   %s" % a, file=sys.stderr)
     def __new__(cls, node):
         action = cls.actiondict[node]
         return object.__new__(action)
@@ -70,18 +70,18 @@ class CreateAction(PBuilderAction):
         if opt.xmlfile:
             ret, prjdir, err = command_out_stderr ('%s control create_project' % (elbe_exe))
             if ret != 0:
-                print ("elbe control create_project failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control create_project failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             prjdir = prjdir.strip()
             ret, msg, err = command_out_stderr ('%s control set_xml "%s" "%s"' % (elbe_exe, prjdir, opt.xmlfile))
 
             if ret != 0:
-                print ("elbe control set_xml failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control set_xml failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             if opt.writeproject:
@@ -92,29 +92,29 @@ class CreateAction(PBuilderAction):
         elif opt.project:
             prjdir = opt.project
         else:
-            print ('you need to specify --project option', file=sys.stderr)
+            print("you need to specify --project option", file=sys.stderr)
             sys.exit(20)
 
 
-        print ("Creating pbuilder")
+        print("Creating pbuilder")
 
         try:
             system ('%s control build_pbuilder "%s"' % (elbe_exe, prjdir))
         except CommandError:
-            print ("elbe control build_pbuilder Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("elbe control build_pbuilder Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
         try:
             system ('%s control wait_busy "%s"' % (elbe_exe, prjdir) )
         except CommandError:
-            print ("elbe control wait_busy Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("elbe control wait_busy Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
-        print ("")
-        print ("Building Pbuilder finished !")
-        print ("")
+        print("")
+        print("Building Pbuilder finished !")
+        print("")
 
 PBuilderAction.register(CreateAction)
 
@@ -128,23 +128,23 @@ class UpdateAction(PBuilderAction):
     def execute(self, opt, args):
 
         if not opt.project:
-            print ('you need to specify --project option', file=sys.stderr)
+            print("you need to specify --project option", file=sys.stderr)
             sys.exit(20)
 
         prjdir = opt.project
 
-        print ("Updating pbuilder")
+        print("Updating pbuilder")
 
         try:
             system ('%s control update_pbuilder "%s"' % (elbe_exe, prjdir))
         except CommandError:
-            print ("elbe control update_pbuilder Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("elbe control update_pbuilder Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
-        print ("")
-        print ("Updating Pbuilder finished !")
-        print ("")
+        print("")
+        print("Updating Pbuilder finished !")
+        print("")
 
 PBuilderAction.register(CreateAction)
 
@@ -162,9 +162,9 @@ class BuildAction(PBuilderAction):
         if opt.xmlfile:
             ret, prjdir, err = command_out_stderr ('%s control create_project --retries 60 "%s"' % (elbe_exe, opt.xmlfile))
             if ret != 0:
-                print ("elbe control create_project failed.", file=sys.stderr)
-                print (err, file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control create_project failed.", file=sys.stderr)
+                print(err, file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             prjdir = prjdir.strip()
@@ -172,95 +172,95 @@ class BuildAction(PBuilderAction):
             try:
                 system ('%s control build_pbuilder "%s"' % (elbe_exe, prjdir))
             except CommandError:
-                print ("elbe control build_pbuilder Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control build_pbuilder Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
             try:
                 system ('%s control wait_busy "%s"' % (elbe_exe, prjdir) )
             except CommandError:
-                print ("elbe control wait_busy Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control wait_busy Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
-            print ("")
-            print ("Building Pbuilder finished !")
-            print ("")
+            print("")
+            print("Building Pbuilder finished !")
+            print("")
         elif opt.project:
             prjdir = opt.project
             system ('%s control rm_log %s' % (elbe_exe, prjdir))
         else:
-            print ('you need to specify --project or --xmlfile option', file=sys.stderr)
+            print("you need to specify --project or --xmlfile option", file=sys.stderr)
             sys.exit(20)
 
-        print ("")
-        print ("Packing Source into tmp archive")
-        print ("")
+        print("")
+        print("Packing Source into tmp archive")
+        print("")
         try:
             system ('tar cfz "%s" .' % (tmp.fname ("pdebuild.tar.gz")))
         except CommandError:
-            print ("tar Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("tar Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
 
         for of in opt.origfile:
-            print ("")
-            print ("Pushing orig file '%s' into pbuilder" % of)
-            print ("")
+            print("")
+            print("Pushing orig file '%s' into pbuilder" % of)
+            print("")
             try:
                 system ('%s control set_orig "%s" "%s"' % (elbe_exe, prjdir, of))
             except CommandError:
-                print ("elbe control set_orig Failed", file=sys.stderr)
-                print ("Giving up", file=sys.stderr)
+                print("elbe control set_orig Failed", file=sys.stderr)
+                print("Giving up", file=sys.stderr)
                 sys.exit(20)
 
-        print ("")
-        print ("Pushing source into pbuilder")
-        print ("")
+        print("")
+        print("Pushing source into pbuilder")
+        print("")
 
         try:
             system ('%s control set_pdebuild "%s" "%s"' % (elbe_exe, prjdir, tmp.fname ("pdebuild.tar.gz")))
         except CommandError:
-            print ("elbe control set_pdebuild Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("elbe control set_pdebuild Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
         try:
             system ('%s control wait_busy "%s"' % (elbe_exe, prjdir) )
         except CommandError:
-            print ("elbe control wait_busy Failed", file=sys.stderr)
-            print ("Giving up", file=sys.stderr)
+            print("elbe control wait_busy Failed", file=sys.stderr)
+            print("Giving up", file=sys.stderr)
             sys.exit(20)
-        print ("")
-        print ("Pdebuild finished !")
-        print ("")
+        print("")
+        print("Pdebuild finished !")
+        print("")
 
         if opt.skip_download:
-            print ("")
-            print ("Listing available files:")
-            print ("")
+            print("")
+            print("Listing available files:")
+            print("")
             try:
                 system ('%s control --pbuilder-only get_files "%s"' % (elbe_exe, prjdir) )
             except CommandError:
-                print ("elbe control get_files Failed", file=sys.stderr)
-                print ("", file=sys.stderr)
-                print ("dumping logfile", file=sys.stderr)
+                print("elbe control get_files Failed", file=sys.stderr)
+                print("", file=sys.stderr)
+                print("dumping logfile", file=sys.stderr)
 
                 try:
                     system ('%s control dump_file "%s" log.txt' % (
                             elbe_exe, prjdir ))
                 except CommandError:
-                    print ("elbe control dump_file Failed", file=sys.stderr)
-                    print ("", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control dump_file Failed", file=sys.stderr)
+                    print("", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
 
                 sys.exit(20)
 
-            print ("")
-            print ('Get Files with: elbe control get_file "%s" <filename>' % prjdir)
+            print("")
+            print("Get Files with: 'elbe control get_file %s <filename>'" % prjdir)
         else:
-            print ("")
-            print ("Getting generated Files")
-            print ("")
+            print("")
+            print("Getting generated Files")
+            print("")
 
             ensure_outdir (wdfs, opt)
 
@@ -268,17 +268,17 @@ class BuildAction(PBuilderAction):
                 system ('%s control --pbuilder-only get_files --output "%s" "%s"' % (
                         elbe_exe, opt.outdir, prjdir ))
             except CommandError:
-                print ("elbe control get_files Failed", file=sys.stderr)
-                print ("", file=sys.stderr)
-                print ("dumping logfile", file=sys.stderr)
+                print("elbe control get_files Failed", file=sys.stderr)
+                print("", file=sys.stderr)
+                print("dumping logfile", file=sys.stderr)
 
                 try:
                     system ('%s control dump_file "%s" log.txt' % (
                             elbe_exe, prjdir ))
                 except CommandError:
-                    print ("elbe control dump_file Failed", file=sys.stderr)
-                    print ("", file=sys.stderr)
-                    print ("Giving up", file=sys.stderr)
+                    print("elbe control dump_file Failed", file=sys.stderr)
+                    print("", file=sys.stderr)
+                    print("Giving up", file=sys.stderr)
 
                 sys.exit(20)
 
diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index a0bfdbdb..a612cb4c 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -60,7 +60,7 @@ class BuildEnv ():
             self.fresh_debootstrap = True
             self.need_dumpdebootstrap = True
         else:
-            print('work on existing rfs')
+            print("work on existing rfs")
             self.fresh_debootstrap = False
             self.need_dumpdebootstrap = False
 
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index 0222eb38..03c5a4cc 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -108,11 +108,11 @@ class ElbeSoapClient(object):
                 retry = retry - 1
                 if not retry:
                     fp.close ()
-                    print ("file transfer failed", file=sys.stderr)
+                    print("file transfer failed", file=sys.stderr)
                     sys.exit(20)
 
             if ret == "FileNotFound":
-                print (ret, file=sys.stderr)
+                print(ret, file=sys.stderr)
                 sys.exit(20)
             if ret == "EndOfFile":
                 fp.close ()
@@ -128,9 +128,9 @@ class ClientAction(object):
         cls.actiondict[action.tag] = action
     @classmethod
     def print_actions(cls):
-        print ('available subcommands are:', file=sys.stderr)
+        print("available subcommands are:", file=sys.stderr)
         for a in cls.actiondict:
-            print ('   ' + a, file=sys.stderr)
+            print("   %s" % a, file=sys.stderr)
     def __new__(cls, node):
         action = cls.actiondict[node]
         return object.__new__(action)
@@ -146,7 +146,7 @@ class RemoveLogAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control rm_log <project_dir>", file=sys.stderr)
+            print("usage: elbe control rm_log <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -167,9 +167,9 @@ class ListProjectsAction(ClientAction):
 
         try:
             for p in projects.SoapProject:
-                print (p.builddir + '\t' + p.name + '\t' + p.version + '\t' + p.status + '\t' + str(p.edit))
+                print("%s\t%s\t%s\t%s\t%s" %  (p.builddir, p.name, p.version, p.status, str(p.edit)))
         except AttributeError:
-            print ('No projects configured in initvm')
+            print("No projects configured in initvm")
 
 ClientAction.register(ListProjectsAction)
 
@@ -184,7 +184,7 @@ class ListUsersAction(ClientAction):
         users = client.service.list_users ()
 
         for u in users.string:
-            print (u)
+            print(u)
 
 ClientAction.register(ListUsersAction)
 
@@ -198,7 +198,7 @@ class CreateProjectAction(ClientAction):
     def execute(self, client, opt, args):
 
         uuid = client.service.new_project ()
-        print (uuid)
+        print(uuid)
 
 ClientAction.register(CreateProjectAction)
 
@@ -211,7 +211,7 @@ class ResetProjectAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control reset_project <project_dir>", file=sys.stderr)
+            print("usage: elbe control reset_project <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -229,7 +229,7 @@ class DeleteProjectAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control del_project <project_dir>", file=sys.stderr)
+            print("usage: elbe control del_project <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -246,7 +246,7 @@ class SetXmlAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 2:
-            print ("usage: elbe control set_xml <project_dir> <xml>", file=sys.stderr)
+            print("usage: elbe control set_xml <project_dir> <xml>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -255,11 +255,11 @@ class SetXmlAction(ClientAction):
         try:
             x = ElbeXML (filename, skip_validate=True, url_validation=ValidationMode.NO_CHECK)
         except IOError as e:
-            print ("%s is not a valid elbe xml file" % filename)
+            print("%s is not a valid elbe xml file" % filename)
             sys.exit (20)
 
         if not x.has ('target'):
-          print ("<target> is missing, this file can't be built in an initvm",
+          print("<target> is missing, this file can't be built in an initvm",
                   file=sys.stderr)
           sys.exit (20)
 
@@ -280,10 +280,10 @@ class SetXmlAction(ClientAction):
                                                        xml_base64,
                                                        part)
                 if part == -1:
-                    print ("project busy, upload not allowed")
+                    print("project busy, upload not allowed")
                     return part
                 if part == -2:
-                    print ("upload of xml finished")
+                    print("upload of xml finished")
                     return 0
 
 
@@ -299,7 +299,7 @@ class BuildAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control build <project_dir>", file=sys.stderr)
+            print("usage: elbe control build <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -318,7 +318,7 @@ class BuildSysrootAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control build-sysroot <project_dir>", file=sys.stderr)
+            print("usage: elbe control build-sysroot <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -336,7 +336,7 @@ class GetFileAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 2:
-            print ("usage: elbe control get_file <project_dir> <file>", file=sys.stderr)
+            print("usage: elbe control get_file <project_dir> <file>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -363,7 +363,7 @@ class BuildChrootAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control build_chroot_tarball <project_dir>", file=sys.stderr)
+            print("usage: elbe control build_chroot_tarball <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -381,7 +381,7 @@ class DumpFileAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 2:
-            print ("usage: elbe control dump_file <project_dir> <file>", file=sys.stderr)
+            print("usage: elbe control dump_file <project_dir> <file>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -391,7 +391,7 @@ class DumpFileAction(ClientAction):
         while True:
             ret = client.service.get_file (builddir, filename, part)
             if ret == "FileNotFound":
-                print (ret, file=sys.stderr)
+                print(ret, file=sys.stderr)
                 sys.exit(20)
             if ret == "EndOfFile":
                 return
@@ -410,7 +410,7 @@ class GetFilesAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control get_files <project_dir>", file=sys.stderr)
+            print("usage: elbe control get_files <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -427,9 +427,9 @@ class GetFilesAction(ClientAction):
 
             nfiles += 1
             try:
-                print ("%s \t(%s)" % (f.name, f.description))
+                print("%s \t(%s)" % (f.name, f.description))
             except AttributeError:
-                print ("%s" % (f.name))
+                print("%s" % (f.name))
 
             if opt.output:
                 fs = Filesystem ('/')
@@ -452,7 +452,7 @@ class WaitProjectBusyAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control wait_busy <project_dir>", file=sys.stderr)
+            print("usage: elbe control wait_busy <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -474,13 +474,13 @@ class WaitProjectBusyAction(ClientAction):
 
                         localtime = time.asctime(time.localtime(time.time()))
                         try:
-                            print (localtime + " -- " + log[1].replace('\n', ''))
+                            print(localtime + " -- " + log[1].replace('\n', ''))
                         except IndexError:
                             pass
                     else:
                         time.sleep(1)
                 else:
-                    print ("strange part: %d (skipped)" % part)
+                    print("strange part: %d (skipped)" % part)
                     part = part+1
 
 ClientAction.register(WaitProjectBusyAction)
@@ -496,7 +496,7 @@ class SetCdromAction(ClientAction):
         size = 1024 * 1024
 
         if len (args) != 2:
-            print ("usage: elbe control set_cdrom <project_dir> <cdrom file>", file=sys.stderr)
+            print("usage: elbe control set_cdrom <project_dir> <cdrom file>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -525,7 +525,7 @@ class SetOrigAction(ClientAction):
         size =  1024 * 1024
 
         if len (args) != 2:
-            print ("usage: elbe control set_orig <project_dir> <orig file>", file=sys.stderr)
+            print("usage: elbe control set_orig <project_dir> <orig file>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -552,7 +552,7 @@ class ShutdownInitvmAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 0:
-            print ("usage: elbe control shutdown_initvm", file=sys.stderr)
+            print("usage: elbe control shutdown_initvm", file=sys.stderr)
             sys.exit(20)
 
         # if shutdown kills the daemon before it can answer the request
@@ -574,7 +574,7 @@ class SetPdebuilderAction(ClientAction):
         size = 1024 * 1024
 
         if len (args) != 2:
-            print ("usage: elbe control set_pdebuild <project_dir> <pdebuild file>", file=sys.stderr)
+            print("usage: elbe control set_pdebuild <project_dir> <pdebuild file>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -601,7 +601,7 @@ class BuildPbuilderAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control build_pbuilder <project_dir>", file=sys.stderr)
+            print("usage: elbe control build_pbuilder <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -618,7 +618,7 @@ class UpdatePbuilderAction(ClientAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe control update_pbuilder <project_dir>", file=sys.stderr)
+            print("usage: elbe control update_pbuilder <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -633,9 +633,9 @@ class RepoAction(ClientAction):
         cls.repoactiondict[action.tag] = action
     @classmethod
     def print_actions(cls):
-        print ('available subcommands are:', file=sys.stderr)
+        print("available subcommands are:", file=sys.stderr)
         for a in cls.repoactiondict:
-            print ('   ' + a, file=sys.stderr)
+            print("   %s" % a, file=sys.stderr)
     def __new__(cls, node):
         action = cls.repoactiondict[node]
         return object.__new__(action)
@@ -650,7 +650,7 @@ class ListPackagesAction(RepoAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe prjrepo list_packages <project_dir>", file=sys.stderr)
+            print("usage: elbe prjrepo list_packages <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -668,7 +668,7 @@ class DownloadAction(RepoAction):
 
     def execute(self, client, opt, args):
         if len (args) != 1:
-            print ("usage: elbe prjrepo download <project_dir>", file=sys.stderr)
+            print("usage: elbe prjrepo download <project_dir>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -709,15 +709,15 @@ class UploadPackageAction(RepoAction):
                                                        xml_base64,
                                                        part)
                 if part == -1:
-                    print ("project busy, upload not allowed")
+                    print("project busy, upload not allowed")
                     return -1
                 if part == -2:
-                    print ("Upload of package finished.")
+                    print("Upload of package finished.")
                     break
 
     def execute(self, client, opt, args):
         if len (args) != 2:
-            print ("usage: elbe prjrepo upload_pkg <project_dir> <deb/dsc file>", file=sys.stderr)
+            print("usage: elbe prjrepo upload_pkg <project_dir> <deb/dsc file>", file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
@@ -730,7 +730,7 @@ class UploadPackageAction(RepoAction):
 
         # Check filetype
         if filename[-3:] not in ['dsc','deb']:
-            print ("Error: Only .dsc and .deb files allowed to upload.")
+            print("Error: Only .dsc and .deb files allowed to upload.")
         else:
             filetype = filename[-4:]
 
@@ -750,12 +750,12 @@ class UploadPackageAction(RepoAction):
         # Abort if one or more source files are missing
         if abort: sys.exit(20)
 
-        print ("Start uploading file(s)...")
+        print("Start uploading file(s)...")
         for f in files:
             print("Upload %s..." % f)
             self.upload_file(client, f, builddir)
 
-        print ("Including Package in initvm...")
+        print("Including Package in initvm...")
         client.service.include_package(builddir, filename)
 
 
-- 
2.15.1




More information about the elbe-devel mailing list