python: Resolve pep8 comparison errors.
[cascardo/ovs.git] / vtep / ovs-vtep
index 1811e29..47ef65c 100755 (executable)
@@ -53,7 +53,7 @@ bfd_ref = {}
 def call_prog(prog, args_list):
     cmd = [prog, "-vconsole:off"] + args_list
     output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()
-    if len(output) == 0 or output[0] == None:
+    if len(output) == 0 or output[0] is None:
         output = ""
     else:
         output = output[0].strip()
@@ -100,7 +100,7 @@ class Logical_Switch(object):
         column = vtep_ctl("--columns=tunnel_key find logical_switch "
                               "name=%s" % self.name)
         tunnel_key = column.partition(":")[2].strip()
-        if (tunnel_key and type(eval(tunnel_key)) == types.IntType):
+        if tunnel_key and isinstance(eval(tunnel_key), types.IntType):
             self.tunnel_key = tunnel_key
             vlog.info("using tunnel key %s in %s"
                       % (self.tunnel_key, self.name))