Skip to content

Commit d44f000

Browse files
committed
encode unicode instead of implicit casting
1 parent 25c6f67 commit d44f000

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/xmlsec/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def serialize(t, stream=None):
185185

186186
def unicode_to_bytes(u):
187187
if six.PY2:
188-
return str(u)
188+
return u.encode('utf-8')
189189
else:
190190
return bytes(u, encoding='utf-8')
191191

0 commit comments

Comments
 (0)