server/utils.py
changeset 10589 7c23b7de2b8d
parent 10095 200bd6a601dc
child 10678 77333ec71fab
--- a/server/utils.py	Fri Sep 11 14:28:06 2015 +0200
+++ b/server/utils.py	Fri Sep 11 14:52:09 2015 +0200
@@ -16,6 +16,7 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """Some utilities for the CubicWeb server."""
+from __future__ import print_function
 
 __docformat__ = "restructuredtext en"
 
@@ -92,7 +93,7 @@
                        passwdmsg='password'):
     if not user:
         if msg:
-            print msg
+            print(msg)
         while not user:
             user = raw_input('login: ')
         user = unicode(user, sys.stdin.encoding)
@@ -102,7 +103,7 @@
             passwd2 = getpass('confirm password: ')
             if passwd == passwd2:
                 break
-            print 'password doesn\'t match'
+            print('password doesn\'t match')
             passwd = getpass('password: ')
     # XXX decode password using stdin encoding then encode it using appl'encoding
     return user, passwd