[server] unicode → text_type in utils 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 15 Feb 2018 11:04:20 +0100
branch3.26
changeset 12280 577e8d3896b4
parent 12279 e2953e0de494
child 12281 5cc17bac799e
[server] unicode → text_type in utils
cubicweb/server/utils.py
--- a/cubicweb/server/utils.py	Thu Feb 15 11:02:48 2018 +0100
+++ b/cubicweb/server/utils.py	Thu Feb 15 11:04:20 2018 +0100
@@ -26,7 +26,7 @@
 from threading import Thread
 from getpass import getpass
 
-from six import PY2
+from six import PY2, text_type
 from six.moves import input
 
 from passlib.utils import handlers as uh, to_hash_str
@@ -106,7 +106,7 @@
         while not user:
             user = input('login: ')
         if PY2:
-            user = unicode(user, sys.stdin.encoding)
+            user = text_type(user, sys.stdin.encoding)
     passwd = getpass('%s: ' % passwdmsg)
     if confirm:
         while True: