mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-07 05:31:21 +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
|
lineno = None
|
||||||
if hasattr(e, 'problem_mark'):
|
if hasattr(e, 'problem_mark'):
|
||||||
lineno = e.problem_mark.line # pylint: disable=no-member
|
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
|
loads = load
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user