Lower display of msgpack failure msg to debug (#33078)

Closes #33074
This commit is contained in:
Mike Place 2016-05-06 08:28:14 -07:00
parent d4928c5a22
commit 30edeadafd

View File

@ -115,9 +115,10 @@ class Serial(object):
gc.disable() # performance optimization for msgpack
return msgpack.loads(msg, use_list=True)
except Exception as exc:
log.critical('Could not deserialize msgpack message: {0}'
'This often happens when trying to read a file not in binary mode.'
'Please open an issue and include the following error: {1}'.format(msg, exc))
log.critical('Could not deserialize msgpack message.'
'This often happens when trying to read a file not in binary mode'
'To see message payload, enable debug logging and retry. Exception: {0}'.format(exc))
log.debug('Msgpack deserialization failure on message: {0}'.format(msg))
raise
finally:
gc.enable()