diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-06-02 20:59:28 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-06-02 20:59:28 +0300 |
commit | e49b7e02b2150413d2e78db709277fae0887be46 (patch) | |
tree | 6c39946f2b4aca080c75274f97ec263f793ae012 /mediagoblin/plugins/basic_auth/tools.py | |
parent | a80c74bbcc6ac0208cfef725a441810a29876cff (diff) | |
download | mediagoblin-e49b7e02b2150413d2e78db709277fae0887be46.tar.lz mediagoblin-e49b7e02b2150413d2e78db709277fae0887be46.tar.xz mediagoblin-e49b7e02b2150413d2e78db709277fae0887be46.zip |
Use six.text_type instead of unicode().
I will be switch to use ``from __future__ import unicode_literals`` later.
Diffstat (limited to 'mediagoblin/plugins/basic_auth/tools.py')
-rw-r--r-- | mediagoblin/plugins/basic_auth/tools.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/plugins/basic_auth/tools.py b/mediagoblin/plugins/basic_auth/tools.py index f943bf39..13f240b2 100644 --- a/mediagoblin/plugins/basic_auth/tools.py +++ b/mediagoblin/plugins/basic_auth/tools.py @@ -16,6 +16,8 @@ import bcrypt import random +import six + from mediagoblin import mg_globals from mediagoblin.tools.crypto import get_timed_signer_url from mediagoblin.tools.mail import send_email @@ -66,7 +68,7 @@ def bcrypt_gen_password_hash(raw_pass, extra_salt=None): if extra_salt: raw_pass = u"%s:%s" % (extra_salt, raw_pass) - return unicode( + return six.text_type( bcrypt.hashpw(raw_pass.encode('utf-8'), bcrypt.gensalt())) |