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.
1 parent 5110561 commit 919bfc7Copy full SHA for 919bfc7
oauth2/__init__.py
@@ -92,6 +92,8 @@ def to_unicode(s):
92
""" Convert to unicode, raise exception with instructive error
93
message if s is not unicode or ascii. """
94
if not isinstance(s, unicode):
95
+ if not isinstance(s, str):
96
+ raise TypeError('You are required to pass either unicode or string here, not: %r (%s)' % (type(s), s))
97
try:
98
s = s.decode('ascii')
99
except UnicodeDecodeError, le:
0 commit comments