diff mbox series

[ovs-dev,1/3] ovs-check-dead-ifs: python3 print format

Message ID 20190913172903.9464-1-aconole@redhat.com
State Accepted
Commit c864b82d889dc47fb88d5cdde8caeca962776871
Headers show
Series [ovs-dev,1/3] ovs-check-dead-ifs: python3 print format | expand

Commit Message

Aaron Conole Sept. 13, 2019, 5:29 p.m. UTC
The print call changed in python3, so update it.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 utilities/ovs-check-dead-ifs.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

William Tu Sept. 14, 2019, 2:02 p.m. UTC | #1
On Fri, Sep 13, 2019 at 01:29:01PM -0400, Aaron Conole wrote:
> The print call changed in python3, so update it.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>

LGTM
Acked-by: William Tu <u9012063@gmail.com>

> ---
>  utilities/ovs-check-dead-ifs.in | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in
> index ac54f6c9c..f398a3401 100755
> --- a/utilities/ovs-check-dead-ifs.in
> +++ b/utilities/ovs-check-dead-ifs.in
> @@ -37,7 +37,7 @@ for ifname in os.listdir("/sys/class/net"):
>      except IOError:
>          pass
>      except ValueError:
> -        print "%s: unexpected format\n" % fn
> +        print("%s: unexpected format\n" % fn)
>  
>  # Get inodes for all packet sockets whose ifindexes don't exist.
>  invalid_inodes = set()
> @@ -95,8 +95,8 @@ for pid in os.listdir("/proc"):
>              bad_pids.add(pid)
>  
>  if bad_pids:
> -    print """
> +    print("""
>  The following processes are listening for packets to arrive on network devices
> -that no longer exist. You may want to restart them."""
> +that no longer exist. You may want to restart them.""")
>      sys.stdout.flush()
>      os.execvp("ps", ["ps"] + ["%s" % pid for pid in bad_pids])
> -- 
> 2.21.0
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Ben Pfaff Sept. 25, 2019, 4:59 p.m. UTC | #2
On Fri, Sep 13, 2019 at 01:29:01PM -0400, Aaron Conole wrote:
> The print call changed in python3, so update it.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>

Thanks for the patches.  (William, thanks for the reviews.)  I applied
this series to master.
diff mbox series

Patch

diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in
index ac54f6c9c..f398a3401 100755
--- a/utilities/ovs-check-dead-ifs.in
+++ b/utilities/ovs-check-dead-ifs.in
@@ -37,7 +37,7 @@  for ifname in os.listdir("/sys/class/net"):
     except IOError:
         pass
     except ValueError:
-        print "%s: unexpected format\n" % fn
+        print("%s: unexpected format\n" % fn)
 
 # Get inodes for all packet sockets whose ifindexes don't exist.
 invalid_inodes = set()
@@ -95,8 +95,8 @@  for pid in os.listdir("/proc"):
             bad_pids.add(pid)
 
 if bad_pids:
-    print """
+    print("""
 The following processes are listening for packets to arrive on network devices
-that no longer exist. You may want to restart them."""
+that no longer exist. You may want to restart them.""")
     sys.stdout.flush()
     os.execvp("ps", ["ps"] + ["%s" % pid for pid in bad_pids])