# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1274869897 -7200
# Node ID e1cbf6b304ea0423f50d716a7eed29b66243f501
# Parent  c1823448f81d7e259db1c8909d7ea555f277f4ab
[sqlite] fix crash on db-create with sqlite abd unexistent database due to missing paren in logical expression (closes #909604)

diff -r c1823448f81d -r e1cbf6b304ea server/serverctl.py
--- a/server/serverctl.py	Wed May 26 12:31:34 2010 +0200
+++ b/server/serverctl.py	Wed May 26 12:31:37 2010 +0200
@@ -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')