X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=vtep%2Fovs-vtep;h=47ef65c70742322cca3c6c9a7e94d49475bf5847;hb=3c057118d16ae0c7dc02c1c87ee2c19b401e39ce;hp=1811e29acab3ba21067a642e48d9664005511766;hpb=bdca6c4b56b9951b95c02f1fc13cbc78b16eee28;p=cascardo%2Fovs.git diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep index 1811e29ac..47ef65c70 100755 --- a/vtep/ovs-vtep +++ b/vtep/ovs-vtep @@ -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))