[FIX] Document : Logging enabled for abstracted_fs

lp bug: https://launchpad.net/bugs/383940 fixed

bzr revid: jvo@tinyerp.com-20090723091843-pm0bu7rx95yc8jv7
This commit is contained in:
uco(OpenERP) 2009-07-23 14:48:43 +05:30 committed by Jay (Open ERP)
parent 00bc84ae18
commit 90a1950b15
1 changed files with 14 additions and 11 deletions

View File

@ -126,17 +126,20 @@ class abstracted_fs:
for db_name in result:
db, cr = None, None
try:
db = pooler.get_db_only(db_name)
cr = db.cursor()
cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'")
if not cr.fetchone():
continue
cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ")
res = cr.fetchone()
if res and len(res):
self.db_name_list.append(db_name)
cr.commit()
try:
db = pooler.get_db_only(db_name)
cr = db.cursor()
cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'")
if not cr.fetchone():
continue
cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ")
res = cr.fetchone()
if res and len(res):
self.db_name_list.append(db_name)
cr.commit()
except Exception, e:
log(e)
finally:
if cr is not None:
cr.close()