fix small bug, print current config if directly called #64

master
b3yond 2018-11-06 16:22:11 +01:00
parent 631396e764
commit e8ac1ca1c4
1 changed files with 6 additions and 1 deletions

View File

@ -9,7 +9,7 @@ def load_env():
:return: config dictionary of dictionaries.
"""
with open('config.toml.example') as defaultconf:
config = toml.load(configfile)
config = toml.load(defaultconf)
try:
config['twitter']['consumer_key'] = os.environ['CONSUMER_KEY']
@ -55,3 +55,8 @@ try:
config = toml.load(configfile)
except FileNotFoundError:
config = load_env()
if __name__ == "__main__":
for category in config:
for key in config[category]:
print(key + " = " + str(config[category][key]))