1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 11:58:55 +00: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:
Marc Bonnici 2018-07-04 11:22:27 +01:00 committed by setrofim
parent 9d34fc0a4d
commit 5231bbcf71

View File

@ -89,6 +89,11 @@ class SerializerSyntaxError(Exception):
"""
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):
super(SerializerSyntaxError, self).__init__(message)