提交 8230a43c 编写于 作者: C Cleber Rosa

avocado/plugins/run.py: use ValueError.args, as Python 3 has no message attribute

This fixes occurrences of crashes such as:

    Traceback (most recent call last):
      File "/tmp/py3/bin/avocado", line 6, in <module>
        exec(compile(open(__file__).read(), __file__, 'exec'))
      File "/home/cleber/src/avocado/avocado/scripts/avocado", line 75, in <module>
        sys.exit(app.run())
      File "/home/cleber/src/avocado/avocado/avocado/core/app.py", line 91, in run
        return method(self.parser.args)
      File "/home/cleber/src/avocado/avocado/avocado/plugins/run.py", line 208, in run
        LOG_UI.error(e.message)
    AttributeError: 'ValueError' object has no attribute 'message'
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 f39fb9bb
......@@ -205,7 +205,7 @@ class Run(CLICmd):
try:
args.job_timeout = time_to_seconds(args.job_timeout)
except ValueError as e:
LOG_UI.error(e.message)
LOG_UI.error(e.args[0])
sys.exit(exit_codes.AVOCADO_FAIL)
job_instance = job.Job(args)
pre_post_dispatcher = JobPrePostDispatcher()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册