Skip to content

Commit 684d718

Browse files
author
Elpedio Adoptante Jr
committed
safe to dict
1 parent d2fe780 commit 684d718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stackify/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def from_record(self, record):
3737
if k not in RECORD_VARS}
3838

3939
if data:
40-
self.data = json.dumps(data, default=lambda x: x.__dict__)
40+
self.data = json.dumps(data, default=lambda x: hasattr(x, '__dict__') and x.__dict__ or x.__str__())
4141

4242
if record.exc_info:
4343
self.Ex = StackifyError()

0 commit comments

Comments
 (0)