Browse Source

manage_sql.py: check that the config file exists

pull/1/head
Alarig Le Lay 2 years ago
parent
commit
ef05eae0bc
No known key found for this signature in database
GPG Key ID: C865491BF197B54F
  1. 7
      manage_sql.py

7
manage_sql.py

@ -12,10 +12,17 @@
# */
from configparser import ConfigParser
import os
import pymysql
import sys
# Read conf.ini
INI_CONF = "./config/sql_conf.ini"
if os.path.exists(INI_CONF) is False:
print("MySQL configuration error, {}: file not found".format(INI_CONF))
sys.exit(1)
CONFIG = ConfigParser()
CONFIG.read(INI_CONF)

Loading…
Cancel
Save