From: Kyr Shatskyy Date: Tue, 8 Oct 2019 17:40:51 +0000 (+0200) Subject: run_tasks: use isinstance() instead of type() X-Git-Tag: 1.1.0~222^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1317%2Fhead;p=teuthology.git run_tasks: use isinstance() instead of type() Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index f55d60ac4..5ad921470 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)