avocado.core.exceptions: Avoid avocado crashing on unknown error status

Since someone might want to be funny and raise those
exceptions, it is safer to make them to return "FAIL"
instead of "NEVER_RAISE_THIS", so avocado does not
crash.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 38c1358a
......@@ -21,8 +21,11 @@ class JobBaseException(Exception):
"""
The parent of all job exceptions.
You should be never raising this, but just in case, we'll set its
status' as FAIL.
"""
status = "NEVER_RAISE_THIS"
status = "FAIL"
class JobError(Exception):
......@@ -37,8 +40,11 @@ class TestBaseException(Exception):
"""
The parent of all test exceptions.
You should be never raising this, but just in case, we'll set its
status' as FAIL.
"""
status = "NEVER_RAISE_THIS"
status = "FAIL"
class TestSetupFail(TestBaseException):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册