Last active
April 2, 2020 13:35
-
-
Save asraful/6b2b03076eccb10f83a6229626103226 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Sample Configuration file : config.txt | |
# [rds_config] | |
# run_rds_test_scripts = false | |
# | |
# [mysql] | |
# arn = "any_value" | |
# host = "any_value" | |
#------------------------------------------------------------------------------ | |
import configparser | |
def read_configuration(value): | |
print(value) | |
def _inti_(): | |
config = configparser.ConfigParser() | |
configFilePath = 'config.txt' | |
config.read(configFilePath) | |
mysql_arn = config.get('mysql', 'arn') | |
run_rds_test_scripts = config.get('rds_config', 'run_rds_test_scripts') | |
if run_rds_test_scripts == 'true': | |
print('run') | |
read_configuration(mysql_arn) | |
else: | |
print('no run') | |
_inti_() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment