From b5571746f06a4d46a9bad51444b0ac845e22f5cd Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Wed, 8 Jun 2022 13:28:15 +0200 Subject: [PATCH] suite: fix type error when description is none teuthology-watch fails when run is complete and jobs' description gets None value Example: 2022-06-07 16:41:22,538.538 INFO:teuthology.suite:waiting for the run runner-2022-06-07_16:41:04-suse:tier0-ses7p-none-default-ecp to complete 2022-06-07 16:41:22,539.539 DEBUG:teuthology.suite:the list of unfinished jobs will be displayed every 5.0 minutes 2022-06-07 16:46:22,599.599 DEBUG:teuthology.suite:wait for jobs ['654'] 2022-06-07 16:51:22,633.633 DEBUG:teuthology.suite:wait for jobs ['654'] 2022-06-07 16:51:22,686.686 INFO:teuthology.suite:wait is done Traceback (most recent call last): File "/home/runner/src/teuthology_master/virtualenv/bin/teuthology-wait", line 33, in sys.exit(load_entry_point('teuthology', 'console_scripts', 'teuthology-wait')()) File "/home/runner/src/teuthology_master/scripts/wait.py", line 30, in main return teuthology.suite.wait(name, config.max_job_time, None) File "/home/runner/src/teuthology_master/teuthology/suite/__init__.py", line 234, in wait log.info(job['status'] + " " + url + " " + job['description']) TypeError: must be str, not NoneType Signed-off-by: Kyr Shatskyy --- teuthology/suite/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index 56e3ef1242..b7f0466649 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -231,5 +231,5 @@ def wait(name, max_job_time, upload_url): url = os.path.join(upload_url, name, job['job_id']) else: url = job['log_href'] - log.info(job['status'] + " " + url + " " + job['description']) + log.info(f"{job['status']} {url} {job['description']}") return exit_code -- 2.39.5