Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
fix(converter): encode utf-8 when there is a unicode encode error
Browse files Browse the repository at this point in the history
  • Loading branch information
daveenguyen committed Mar 20, 2019
1 parent 3080c1e commit f1e150a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atomacos/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def convert_value(self, value):
try:
return str(value)
except UnicodeEncodeError:
return unicode(value) # noqa: F821 for python 2
return str(value.encode("utf-8"))
if CFGetTypeID(value) == AXUIElementGetTypeID():
return self.convert_app_ref(value)
if CFGetTypeID(value) == CFArrayGetTypeID():
Expand Down

0 comments on commit f1e150a

Please sign in to comment.