1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

utilts/serializer: Update exception method to support Python3

This commit is contained in:
Marc Bonnici 2018-10-31 11:24:26 +00:00 committed by setrofim
parent e81aaf3421
commit 86287831b3

View File

@ -169,14 +169,14 @@ class json(object):
try:
return _json.load(fh, cls=WAJSONDecoder, object_pairs_hook=OrderedDict, *args, **kwargs)
except ValueError as e:
raise SerializerSyntaxError(e.message)
raise SerializerSyntaxError(e.args[0])
@staticmethod
def loads(s, *args, **kwargs):
try:
return _json.loads(s, cls=WAJSONDecoder, object_pairs_hook=OrderedDict, *args, **kwargs)
except ValueError as e:
raise SerializerSyntaxError(e.message)
raise SerializerSyntaxError(e.args[0])
_mapping_tag = _yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG