[elbe-devel] [PATCH] py3: codingstyle fixup for py3 print conversion
Torben Hohn
torben.hohn at linutronix.de
Mon Dec 18 15:13:52 CET 2017
On Mon, Dec 18, 2017 at 02:58:09PM +0100, Manuel Traut wrote:
> 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>
Reviewed-by: Torben Hohn <torben.hohn 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
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Mit freundlichen Grüßen
Torben Hohn
Linutronix GmbH
Standort: Bremen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806
Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner
Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20171218/750f411e/attachment.sig>
More information about the elbe-devel
mailing list