[FIX] Close the cursor if open
bzr revid: stephane@tinyerp.com-20081216102403-7kpf1n7rcho3fk1i
This commit is contained in:
parent
0c3a25a431
commit
348db86e03
|
@ -37,8 +37,10 @@ def get_db_and_pool(db_name, force_demo=False, status=None, update_module=False)
|
|||
pool_dic[db_name] = pool
|
||||
addons.load_modules(db, force_demo, status, update_module)
|
||||
cr = db.cursor()
|
||||
try:
|
||||
pool.init_set(cr, False)
|
||||
cr.commit()
|
||||
finally:
|
||||
cr.close()
|
||||
|
||||
if not update_module:
|
||||
|
|
Loading…
Reference in New Issue