]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
suite: fix type error when description is none 1764/head
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Wed, 8 Jun 2022 11:28:15 +0000 (13:28 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Wed, 8 Jun 2022 11:28:15 +0000 (13:28 +0200)
commitb5571746f06a4d46a9bad51444b0ac845e22f5cd
tree4495303ea1d3e7271acfcb549bae4065a22010a5
parent40fff4b2911949847a302adfe2f4714cfaccb58e
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 <module>
    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 <kyrylo.shatskyy@suse.com>
teuthology/suite/__init__.py