parse_numpy
should also catch AttributeError
.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
12f38281e1
commit
8b9ac59167
1 changed files with 2 additions and 2 deletions
|
@ -46,8 +46,8 @@ class Message:
|
||||||
if isinstance(obj, (bytes, bytearray)):
|
if isinstance(obj, (bytes, bytearray)):
|
||||||
return '0x' + ''.join([f'{x:02x}' for x in obj])
|
return '0x' + ''.join([f'{x:02x}' for x in obj])
|
||||||
if callable(obj):
|
if callable(obj):
|
||||||
return '<function at {}.{}>'.format(obj.__module__, obj.__name__)
|
return f'<function at {obj.__module__}.{obj.__name__}>'
|
||||||
except (ImportError, TypeError):
|
except (AttributeError, ImportError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue