From 5a6814d2bedce3cc2e3707699f4e5b38e15da12d Mon Sep 17 00:00:00 2001 From: Shyukri Shyukriev Date: Mon, 6 Jul 2020 11:08:30 +0300 Subject: [PATCH] run_tasks.py: Python3 don't have exception.message anymore. This was probably working fine due to six library which was removed recently: https://github.com/ceph/teuthology/commit/9f99b9298265be583c350c71de47109bac4bf6f1 Error seen: ``` During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/worker/src/github.com_ceph_teuthology_master/teuthology/contextutil.py", line 33, in nested yield vars File "/home/worker/src/github.com_ceph_teuthology_master/teuthology/task/install/__init__.py", line 612, in task yield File "/home/worker/src/github.com_ceph_teuthology_master/teuthology/run_tasks.py", line 151, in run_tasks if e.message == 'too many values to unpack': AttributeError: 'ValueError' object has no attribute 'message' ``` Signed-off-by: Shyukri Shyukriev --- 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 2cc647c899..13712528da 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -148,7 +148,7 @@ def run_tasks(tasks, ctx): # causes failures with 'too many values to unpack.' We want to # fail as before, but with easier to understand error indicators. if isinstance(e, ValueError): - if e.message == 'too many values to unpack': + if str(e) == 'too many values to unpack': emsg = 'Possible configuration error in yaml file' log.error(emsg) ctx.summary['failure_info'] = emsg -- 2.39.5