Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing encoding issues, thanks to jqxl0205

This resolves issues #7 and #8
  • Loading branch information...
commit 6a8e3fc8bbb389dbd89fe534f13c2bf6b86aaf67 1 parent 41af581
Miguel Araujo authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 oauth_hook/auth.py
4 oauth_hook/auth.py
View
@@ -20,12 +20,12 @@ def to_utf8(x):
encode utf-8 all strings it contains, returning a list.
"""
if isinstance(x, basestring):
- return x.encode('utf-8')
+ return x.encode('utf-8') if isinstance(x, unicode) else x
try:
l = iter(x)
except TypeError:
return x
- return [to_utf8_if_string(i) for i in l]
+ return [to_utf8(i) for i in l]
generate_verifier = lambda length=8: ''.join([str(random.randint(0, 9)) for i in xrange(length)])
Please sign in to comment.
Something went wrong with that request. Please try again.