Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit ce75776

Browse files
committed
UTF-8 encode ddoc unicode strings in Py2
1 parent a988a28 commit ce75776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cloudant/_common_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class _Code(str):
283283
codifying map and reduce Javascript content.
284284
"""
285285
def __new__(cls, code):
286-
if isinstance(code, unicode):
286+
if type(code).__name__ == 'unicode':
287287
return str.__new__(cls, code.encode('utf8'))
288288
return str.__new__(cls, code)
289289

0 commit comments

Comments
 (0)