Merge branch 'patch-1' into 'master'
fix issue with no db name supplied See merge request flectra-hq/flectra!159
This commit is contained in:
commit
763e6327f1
@ -636,7 +636,7 @@ class configmanager(object):
|
|||||||
except OSError:
|
except OSError:
|
||||||
logging.getLogger(__name__).debug('Failed to create addons data dir %s', d)
|
logging.getLogger(__name__).debug('Failed to create addons data dir %s', d)
|
||||||
try:
|
try:
|
||||||
if not os.listdir(os.path.join(d)):
|
if self.get('db_name') and not os.listdir(os.path.join(d)):
|
||||||
from flectra.sql_db import db_connect
|
from flectra.sql_db import db_connect
|
||||||
with closing(db_connect(self.get('db_name')).cursor()) as cr:
|
with closing(db_connect(self.get('db_name')).cursor()) as cr:
|
||||||
if flectra.tools.table_exists(cr, 'ir_module_module'):
|
if flectra.tools.table_exists(cr, 'ir_module_module'):
|
||||||
|
Loading…
Reference in New Issue
Block a user