From 437ba639f50e412e34a5cf10ce059248823f5349 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Tue, 8 Oct 2019 19:40:51 +0200 Subject: [PATCH] run_tasks: use isinstance() instead of type() Signed-off-by: Kyr Shatskyy --- teuthology/run_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index f55d60ac4e..5ad9214704 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -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) -- 2.39.5