# HG changeset patch # User Sylvain Thénault # Date 1268391027 -3600 # Node ID fc8b4d861f34257607e28251ef39673ca62b0348 # Parent 99a95606c2a164b901876fd7b0f0be5a31b3d46f provide logilab.database compat when creating database diff -r 99a95606c2a1 -r fc8b4d861f34 server/serverctl.py --- 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: