ovs-ctl: Fix indentation when deleting bridges.
[cascardo/ovs.git] / utilities / ovs-check-dead-ifs.in
index 53185d6..ac54f6c 100755 (executable)
@@ -62,7 +62,12 @@ for pid in os.listdir("/proc"):
     except ValueError:
         continue
 
-    for fd in os.listdir("/proc/%d/fd" % pid):
+    try:
+        fds = os.listdir("/proc/%d/fd" % pid)
+    except OSError:
+        continue
+
+    for fd in fds:
         try:
             fd = int(fd)
         except ValueError:
@@ -93,4 +98,5 @@ if bad_pids:
     print """
 The following processes are listening for packets to arrive on network devices
 that no longer exist. You may want to restart them."""
+    sys.stdout.flush()
     os.execvp("ps", ["ps"] + ["%s" % pid for pid in bad_pids])