ovs-bugtool.in: Test for membership should be 'not in'.
authorGurucharan Shetty <guru@ovn.org>
Mon, 6 Jun 2016 06:11:08 +0000 (23:11 -0700)
committerGurucharan Shetty <guru@ovn.org>
Thu, 9 Jun 2016 18:04:45 +0000 (11:04 -0700)
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ryan Moats <rmoats@us.ibm.com>
utilities/bugtool/ovs-bugtool.in

index 95ea482..ced74a9 100755 (executable)
@@ -334,7 +334,7 @@ def collect_data():
         cap = v['cap']
         if 'cmd_args' in v:
             v['output'] = StringIOmtime()
-            if not cap in process_lists:
+            if cap not in process_lists:
                 process_lists[cap] = []
             process_lists[cap].append(
                 ProcOutput(v['cmd_args'], caps[cap][MAX_TIME], v['output'],
@@ -824,7 +824,7 @@ def fd_usage(cap):
             name = fh.readline()
             num_fds = len(os.listdir(os.path.join('/proc/' + d + '/fd')))
             if num_fds > 0:
-                if not num_fds in fd_dict:
+                if num_fds not in fd_dict:
                     fd_dict[num_fds] = []
                 fd_dict[num_fds].append(name.replace('\0', ' ').strip())
         finally:
@@ -873,7 +873,7 @@ def load_plugins(just_capabilities=False, filter=None):
 
     for dir in [d for d in os.listdir(PLUGIN_DIR)
                 if os.path.isdir(os.path.join(PLUGIN_DIR, d))]:
-        if not dir in caps:
+        if dir not in caps:
             if not os.path.exists("%s/%s.xml" % (PLUGIN_DIR, dir)):
                 continue
             xmldoc = parse("%s/%s.xml" % (PLUGIN_DIR, dir))