Close sursor before installing modules

Fix install partner module by command line
This commit is contained in:
Cédric Krier committed 2008-02-27 11:34:07 +01:00
1 parent 5f98f0a002
commit 80458f1897
1 file changed
+1 -2
+1 -2
View File
@@ -119,11 +119,10 @@ class TrytonServer(object):
cursor.execute('SELECT code FROM ir_lang ' \
'WHERE translatable = True')
lang = [x[0] for x in cursor.fetchall()]
cursor.close()
pooler.get_db_and_pool(db_name,
update_module=bool(CONFIG['init'] or CONFIG['update']),
lang=lang)
if cursor:
cursor.close()
if CONFIG["stop_after_init"]:
sys.exit(0)