]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
run_tasks: use isinstance() instead of type() 1317/head
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Tue, 8 Oct 2019 17:40:51 +0000 (19:40 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Tue, 8 Oct 2019 17:40:51 +0000 (19:40 +0200)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/run_tasks.py

index f55d60ac4e584c7ce2a24d710794e0c653543de2..5ad9214704c661f7cf546e4b22bd863654932a8f 100644 (file)
@@ -143,7 +143,7 @@ def run_tasks(tasks, ctx):
         # from yaml files where only one entry of type y is correct.  This
         # causes failures with 'too many values to unpack.'  We want to
         # fail as before, but with easier to understand error indicators.
-        if type(e) == ValueError:
+        if isinstance(e, ValueError):
             if e.message == 'too many values to unpack':
                 emsg = 'Possible configuration error in yaml file'
                 log.error(emsg)