fix issue with no db name supplied

This commit is contained in:
Neha 2018-10-27 14:15:37 +00:00
parent 327f5a88ff
commit 817b65353e
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ class configmanager(object):
except OSError:
logging.getLogger(__name__).debug('Failed to create addons data dir %s', d)
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
with closing(db_connect(self.get('db_name')).cursor()) as cr:
if flectra.tools.table_exists(cr, 'ir_module_module'):