Fix stringify for custom Message

This commit is contained in:
Lonami Exo
2022-02-04 13:05:27 +01:00
parent 56faccf151
commit 3b12cc3e51
2 changed files with 1 additions and 37 deletions

View File

@@ -194,7 +194,7 @@ def pretty_print(obj, indent=None, max_depth=float('inf')):
if max_depth < 0:
return '...'
to_d = getattr(obj, '_to_dict', None) or getattr(obj, 'to_dict', None)
to_d = getattr(obj, 'to_dict', None)
if callable(to_d):
obj = to_d()