[db-create] fix bug introduced by 6060:353bec342e2a (we ask for user while in non verbose mode) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 06 Aug 2010 17:34:24 +0200
branchstable
changeset 6072 9d83b214066a
parent 6071 c7a9e25153c2
child 6073 bf684f1022bf
[db-create] fix bug introduced by 6060:353bec342e2a (we ask for user while in non verbose mode)
server/serverctl.py
--- a/server/serverctl.py	Fri Aug 06 17:33:07 2010 +0200
+++ b/server/serverctl.py	Fri Aug 06 17:34:24 2010 +0200
@@ -71,13 +71,13 @@
                        'on the database:')
                 print special_privs
                 print
-        default_user = source.get('db-user', os.environ.get('USER', ''))
-        user = raw_input('Connect as user ? [%r]: ' % default_user)
-        user = user or default_user
-        if user == source.get('db-user') and source.get('db-password'):
-            password = source['db-password']
-        else:
-            password = getpass('password: ')
+            default_user = source.get('db-user', os.environ.get('USER', ''))
+            user = raw_input('Connect as user ? [%r]: ' % default_user)
+            user = user or default_user
+            if user == source.get('db-user') and source.get('db-password'):
+                password = source['db-password']
+            else:
+                password = getpass('password: ')
     else:
         user = password = None
     extra_args = source.get('db-extra-arguments')