We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30439b6 commit 042579dCopy full SHA for 042579d
1 file changed
src/string_utils.pyx
@@ -103,11 +103,17 @@ cdef void PyToCefString(
103
CefString& cefString
104
) except *:
105
if PY_MAJOR_VERSION < 3:
106
+ # Handle objects that may be converted to string e.g. QString
107
+ if not isinstance(pyString, str) and not isinstance(pyString, unicode):
108
+ pyString = str(pyString)
109
if type(pyString) == unicode:
110
pyString = <bytes>(pyString.encode(
111
g_applicationSettings["string_encoding"],
112
errors=UNICODE_ENCODE_ERRORS))
113
else:
114
115
+ if not isinstance(pyString, str) and not isinstance(pyString, bytes):
116
117
# The unicode type is not defined in Python 3.
118
if type(pyString) == str:
119
0 commit comments