mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
utils/serializer: Fix exception handling in Python3
Allow for the fact that exceptions do not have a 'message' attribute in Python3.
This commit is contained in:
parent
57ddf7845c
commit
9d34fc0a4d
@ -231,7 +231,7 @@ class yaml(object):
|
||||
lineno = None
|
||||
if hasattr(e, 'problem_mark'):
|
||||
lineno = e.problem_mark.line # pylint: disable=no-member
|
||||
raise SerializerSyntaxError(e.message, lineno)
|
||||
raise SerializerSyntaxError(e.args[0] if e.args else str(e), lineno)
|
||||
|
||||
loads = load
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user