mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-14 14:50:54 +01:00
fw/exception: Add 'message' property to SerializerSyntaxError
Allow for the fact that Exceptions do not have a message attribute in Python3 so mimic the functionality.
This commit is contained in:
parent
9d34fc0a4d
commit
5231bbcf71
@ -89,6 +89,11 @@ class SerializerSyntaxError(Exception):
|
|||||||
"""
|
"""
|
||||||
Error loading a serialized structure from/to a file handle.
|
Error loading a serialized structure from/to a file handle.
|
||||||
"""
|
"""
|
||||||
|
@property
|
||||||
|
def message(self):
|
||||||
|
if self.args:
|
||||||
|
return self.args[0]
|
||||||
|
return ''
|
||||||
|
|
||||||
def __init__(self, message, line=None, column=None):
|
def __init__(self, message, line=None, column=None):
|
||||||
super(SerializerSyntaxError, self).__init__(message)
|
super(SerializerSyntaxError, self).__init__(message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user