def get_config_parser():
"""
Get the ConfigParser object containing the system configurations
:return: ConfigParser object containing the system configurations
"""
config = configparser.ConfigParser()
if os.path.exists(CONFIG_FILE_PATH) and os.path.isfile(CONFIG_FILE_PATH):
config.read(CONFIG_FILE_PATH)
return config
else:
logging.error("Config file not found, create %s" % CONFIG_FILE_PATH)
exit(1)
评论列表
文章目录