From 3e89fb8a509c76cf2cb9e1d4b426b2d388d47fda Mon Sep 17 00:00:00 2001 From: spla Date: Tue, 20 Oct 2020 12:56:21 +0200 Subject: [PATCH] Fixed indents --- setup.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index f32d45b..62a9581 100644 --- a/setup.py +++ b/setup.py @@ -175,12 +175,17 @@ def get_hostname( parameter, config_filepath ): print("hostname setup done!") sys.exit(0) -# Load secrets from secrets file -secrets_filepath = "secrets/secrets.txt" -uc_client_id = get_parameter("uc_client_id", secrets_filepath) -uc_client_secret = get_parameter("uc_client_secret", secrets_filepath) -uc_access_token = get_parameter("uc_access_token", secrets_filepath) +############################################################################### +# main -# Load configuration from config file -config_filepath = "config.txt" -mastodon_hostname = get_hostname("mastodon_hostname", config_filepath) # E.g., mastodon.social +if __name__ == '__main__': + + # Load secrets from secrets file + secrets_filepath = "secrets/secrets.txt" + uc_client_id = get_parameter("uc_client_id", secrets_filepath) + uc_client_secret = get_parameter("uc_client_secret", secrets_filepath) + uc_access_token = get_parameter("uc_access_token", secrets_filepath) + + # Load configuration from config file + config_filepath = "config.txt" + mastodon_hostname = get_hostname("mastodon_hostname", config_filepath)