server/serverctl.py
branchstable
changeset 4888 fc8b4d861f34
parent 4837 54969eec48eb
child 4899 c666d265fb95
child 4937 4e08eba12851
--- a/server/serverctl.py	Fri Mar 12 11:49:29 2010 +0100
+++ b/server/serverctl.py	Fri Mar 12 11:50:27 2010 +0100
@@ -330,8 +330,13 @@
                     helper.create_database(cursor, dbname, source['db-user'],
                                            source['db-encoding'])
                 else:
-                    helper.create_database(cursor, dbname,
-                                           encoding=source['db-encoding'])
+                    try:
+                        helper.create_database(cursor, dbname,
+                                               encoding=source['db-encoding'])
+                    except TypeError:
+                        # logilab.database
+                        helper.create_database(cursor, dbname,
+                                               dbencoding=source['db-encoding'])
                 dbcnx.commit()
                 print '-> database %s created.' % dbname
             except: