def parse_config_file(
cipher_suite, config_file="./config/foxha_config.ini"
):
try:
repo_host, repo_port, repo_database, repo_user,\
encrypted_repo_pass =\
Utils.get_config_values_from_config_file(config_file)
except (ConfigParser.NoSectionError) as err:
print_error("Config file error: {}".format(err))
exit(99)
except (ConfigParser.NoOptionError) as err:
print_error("Config file error: {}".format(err))
exit(99)
try:
decrypted_repo_pass = cipher_suite.decrypt(encrypted_repo_pass)
return repo_host, repo_port, repo_database,\
repo_user, decrypted_repo_pass
except InvalidToken as e:
print_error("ERROR: InvalidToken")
exit(99)
except Exception as e:
print_error("ERROR: %s" % e)
exit(3)
评论列表
文章目录