Skip to content

Commit f11cf30

Browse files
committed
Revert "fix mypyp thing"
This reverts commit 21ad873.
1 parent 21ad873 commit f11cf30

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

posthog/utils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,11 @@ def _clean_dataclass(dataclass_):
101101

102102
def _coerce_unicode(cmplx):
103103
try:
104-
if isinstance(cmplx, bytes):
105-
item = cmplx.decode("utf-8", "strict")
106-
else:
107-
item = str(cmplx)
108-
except (AttributeError, UnicodeDecodeError) as exception:
109-
log.warning("Error decoding: %s", str(exception))
104+
item = cmplx.decode("utf-8", "strict")
105+
except AttributeError as exception:
106+
item = ":".join(exception)
107+
item.decode("utf-8", "strict")
108+
log.warning("Error decoding: %s", item)
110109
return None
111110
return item
112111

0 commit comments

Comments
 (0)