[Qemu-devel] [PATCH] fixup! python: futurize -f libfuturize.fixes.fix_print_with_import

Eduardo Habkost posted 1 patch 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180608133745.GH7451@localhost.localdomain
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
tests/docker/docker.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[Qemu-devel] [PATCH] fixup! python: futurize -f libfuturize.fixes.fix_print_with_import
Posted by Eduardo Habkost 5 years, 10 months ago
On Fri, Jun 08, 2018 at 09:29:43AM -0300, Eduardo Habkost wrote:
> Change all Python code to use print as a function.
> 
> This is necessary for Python 3 compatibility.
> 
> Done using:
> 
>   $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
>     sort -u | grep -v README.sh4)
>   $ futurize -w -f libfuturize.fixes.fix_print_with_import $py
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Acked-by: Fam Zheng <famz@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
[...]
>  tests/docker/docker.py                   | 11 +--
[...]

This patch needs an update:

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 tests/docker/docker.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index a18cfcbe94..306e14cf69 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -400,11 +400,11 @@ class ProbeCommand(SubCommand):
         try:
             docker = Docker()
             if docker._command[0] == "docker":
-                print "yes"
+                print("yes")
             elif docker._command[0] == "sudo":
-                print "sudo"
+                print("sudo")
         except Exception:
-            print "no"
+            print("no")
 
         return
 
-- 
2.18.0.rc1.1.g3f1ff2140

-- 
Eduardo

Re: [Qemu-devel] [PATCH] fixup! python: futurize -f libfuturize.fixes.fix_print_with_import
Posted by Stefan Hajnoczi 5 years, 10 months ago
On Fri, Jun 08, 2018 at 10:37:45AM -0300, Eduardo Habkost wrote:
> On Fri, Jun 08, 2018 at 09:29:43AM -0300, Eduardo Habkost wrote:
> > Change all Python code to use print as a function.
> > 
> > This is necessary for Python 3 compatibility.
> > 
> > Done using:
> > 
> >   $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
> >     sort -u | grep -v README.sh4)
> >   $ futurize -w -f libfuturize.fixes.fix_print_with_import $py
> > 
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Acked-by: Fam Zheng <famz@redhat.com>
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> [...]
> >  tests/docker/docker.py                   | 11 +--
> [...]
> 
> This patch needs an update:
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  tests/docker/docker.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>