We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fad0a9c + 0a79044 commit e188936Copy full SHA for e188936
1 file changed
src/onelogin/saml2/compat.py
@@ -37,6 +37,8 @@ def to_string(data):
37
38
def to_bytes(data):
39
""" return bytes """
40
+ if isinstance(data, unicode):
41
+ return data.encode("utf8")
42
return str(data)
43
44
else: # py 3.x
0 commit comments