server/serverctl.py
changeset 5590 a56eb02f9ce7
parent 5555 a64f48dd5fe4
parent 5586 aabe082fee02
child 5696 98d390c28edb
--- a/server/serverctl.py	Tue May 25 11:51:48 2010 +0200
+++ b/server/serverctl.py	Wed May 26 12:33:48 2010 +0200
@@ -43,7 +43,7 @@
     given server.serverconfig
     """
     from getpass import getpass
-    from logilab.common.db import get_connection
+    from logilab.database import get_connection
     dbhost = source.get('db-host')
     if dbname is None:
         dbname = source['db-name']
@@ -317,8 +317,9 @@
         create_db = self.config.create_db
         helper = get_db_helper(driver)
         if driver == 'sqlite':
-            if os.path.exists(dbname) and automatic or \
-                   ASK.confirm('Database %s already exists -- do you want to drop it ?' % dbname):
+            if os.path.exists(dbname) and (
+                automatic or
+                ASK.confirm('Database %s already exists. Drop it?' % dbname)):
                 os.unlink(dbname)
         elif create_db:
             print '\n'+underline_title('Creating the system database')
@@ -392,7 +393,7 @@
     def run(self, args):
         print '\n'+underline_title('Initializing the system database')
         from cubicweb.server import init_repository
-        from logilab.common.db import get_connection
+        from logilab.database import get_connection
         appid = pop_arg(args, msg='No instance specified !')
         config = ServerConfiguration.config_for(appid)
         try: