`parse_numpy` should also catch `AttributeError`.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabio Manganiello 2023-10-12 03:23:34 +02:00
parent 12f38281e1
commit 8b9ac59167
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ class Message:
if isinstance(obj, (bytes, bytearray)):
return '0x' + ''.join([f'{x:02x}' for x in obj])
if callable(obj):
return '<function at {}.{}>'.format(obj.__module__, obj.__name__)
except (ImportError, TypeError):
return f'<function at {obj.__module__}.{obj.__name__}>'
except (AttributeError, ImportError, TypeError):
pass
return