]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix flake8 pytest F632 errors 1256/head
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 4 Feb 2019 18:22:45 +0000 (19:22 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Mon, 4 Feb 2019 23:02:51 +0000 (00:02 +0100)
Signed-off-by: Kyr <kyrylo.shatskyy@suse.com>
teuthology/suite/run.py
teuthology/suite/test/test_build_matrix.py
teuthology/task/lockfile.py

index c84171317bfbe8d5922e5803e5e10812b5a152f8..e34e6012d3f6fc56d58af140dae16e64dcf00666 100644 (file)
@@ -136,7 +136,7 @@ class Run(object):
         if kernel_hash:
             log.info("kernel sha1: {hash}".format(hash=kernel_hash))
             kernel_dict = dict(kernel=dict(kdb=True, sha1=kernel_hash))
-            if kernel_hash is not 'distro':
+            if kernel_hash != 'distro':
                 kernel_dict['kernel']['flavor'] = self.args.kernel_flavor
         else:
             kernel_dict = dict()
index fb6a4d9fefd3c5f65e21183f23f59cdc06e6b811..946126d801da3431c15452cfd7f16f5cce6431da 100644 (file)
@@ -621,14 +621,14 @@ class TestSubset(object):
                 x += 1
         def generate_tree(
                 max_facets, max_fanout, max_depth, namegen, top=True):
-            if max_depth is 0:
+            if max_depth == 0:
                 return None
-            if max_facets is 0:
+            if max_facets == 0:
                 return None
             items = random.choice(range(max_fanout))
-            if items is 0 and top:
+            if items == 0 and top:
                 items = 1
-            if items is 0:
+            if items == 0:
                 return None
             sub_max_facets = max_facets / items
             tree = {}
index a1980c2103882f1e1109eea53d70bc1caa36547d..9843a28fbc1f99cb8bdf9068a5ed8e50c4e3003c 100644 (file)
@@ -225,7 +225,7 @@ def lock_one(op, ctx):
             raise
         if bool(op["expectfail"]):
             result = 1
-        if result is 1:
+        if result == 1:
             if bool(op["expectfail"]):
                 log.info("failed as expected for op {op_}".format(op_=op))
             else: