From d964927a3f00ee392d8a29eeff85532faef7a32f Mon Sep 17 00:00:00 2001 From: b3yond Date: Tue, 6 Nov 2018 16:22:11 +0100 Subject: [PATCH] fix small bug, print current config if directly called #64 --- config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index abbae62..4550b14 100755 --- a/config.py +++ b/config.py @@ -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]))