Exceptions now indicate cause where applicable

Potentially helping with debugging
and contributing to faster issue resolution.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I4b3db6b6416c0b81ce0397e10c833b342dbc2c0e
This commit is contained in:
Jiri Podivin 2021-04-16 14:55:29 +02:00
parent dc2a135d42
commit a12c531409
1 changed files with 7 additions and 1 deletions

View File

@ -483,7 +483,13 @@ class ValidationLogs(object):
validation_id)
if validation_id else self.get_logfile_by_uuid(uuid))
else:
raise RuntimeError("uuid should be either a str or a list")
raise RuntimeError(
(
"uuid should be either a str or a list"
"but is {} instead"
).format(type(uuid))
)
res = []
for result in results:
vlog = ValidationLog(logfile=result)