aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/oauth/tools.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-09-22 13:58:13 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-09-22 13:58:13 -0500
commita6252cbf211691aa9d81fd535f5af7bcdbbd6620 (patch)
treeca1131ba7a8ff0437d392c20a70f17ee7470e3dd /mediagoblin/plugins/oauth/tools.py
parentc47f402d7ee42e88ee1086351010dd598da6c0a5 (diff)
parent6430ae97eca57f4db4bcef54436df6c2abcd21ad (diff)
downloadmediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.tar.lz
mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.tar.xz
mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.zip
Merge branch 'merge-python3-port'
Conflicts: setup.py
Diffstat (limited to 'mediagoblin/plugins/oauth/tools.py')
-rw-r--r--mediagoblin/plugins/oauth/tools.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mediagoblin/plugins/oauth/tools.py b/mediagoblin/plugins/oauth/tools.py
index af0a3305..2053d5d4 100644
--- a/mediagoblin/plugins/oauth/tools.py
+++ b/mediagoblin/plugins/oauth/tools.py
@@ -23,6 +23,8 @@ from datetime import datetime
from functools import wraps
+import six
+
from mediagoblin.tools.response import json_response
@@ -86,7 +88,7 @@ def create_token(client, user):
def generate_identifier():
''' Generates a ``uuid.uuid4()`` '''
- return unicode(uuid.uuid4())
+ return six.text_type(uuid.uuid4())
def generate_token():
@@ -110,5 +112,5 @@ def generate_secret():
'''
# XXX: We might not want it to use bcrypt, since bcrypt takes its time to
# generate the result.
- return unicode(getrandbits(192))
+ return six.text_type(getrandbits(192))