diff --git a/app/commands/lesia_db.py b/app/commands/lesia_db.py index 47063ac..8c03813 100644 --- a/app/commands/lesia_db.py +++ b/app/commands/lesia_db.py @@ -13,7 +13,8 @@ engine = create_engine(current_app.config['LESIA_AGENTS_DB_URI']) # reflect the tables try: lesia_base.prepare(engine, reflect=True) -except OperationalError: +except OperationalError as oe: + current_app.logger.error(oe) current_app.logger.error("Please, configure the mysql database (see db_config.py)") sys.exit(-1) diff --git a/resources/db_config.py b/resources/db_config.py index a4db016..bb76418 100644 --- a/resources/db_config.py +++ b/resources/db_config.py @@ -49,7 +49,7 @@ MYSQL_LESIA = { 'host': '127.0.0.1', 'port': '3306', } -mysql_lesia_uri = 'mysql+pymysql://%(user)s:%(pw)s@%(host)s:%(port)s/%(db)s' % MYSQL +mysql_lesia_uri = 'mysql+pymysql://%(user)s:%(pw)s@%(host)s:%(port)s/%(db)s' % MYSQL_LESIA # To set you databases uri, # uncomment the needed lines to fit your specific needs; -- libgit2 0.21.2