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

Aaron Conole aconole at redhat.com
Fri Sep 13 17:29:01 UTC 2019


The print call changed in python3, so update it.

Signed-off-by: Aaron Conole <aconole at redhat.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



More information about the dev mailing list