From 2b21a626d49d9474c550b9c745ca82bb4a752332 Mon Sep 17 00:00:00 2001 From: jeancf Date: Thu, 8 Sep 2022 10:11:37 +0200 Subject: [PATCH] Less stupid --- twoot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/twoot.py b/twoot.py index 3c05346..9110db9 100755 --- a/twoot.py +++ b/twoot.py @@ -201,12 +201,6 @@ def is_time_valid(timestamp, max_age, min_delay): return ret def login(instance, account, password): - # Check ratelimit status - logging.info('Ratelimit allowed requests: ' + Mastodon.ratelimit_limit) - logging.info('Ratelimit remaining requests: ' + Mastodon.ratelimit_remaining) - logging.info('Ratelimit reset time: ' + time.localtime(Mastodon.ratelimit_reset)) - logging.info('Ratelimit last call: ' + time.localtime(Mastodon.ratelimit_lastcall)) - # Create Mastodon application if it does not exist yet if not os.path.isfile(instance + '.secret'): try: @@ -240,6 +234,12 @@ def login(instance, account, password): logging.fatal(me) sys.exit(-1) + # Check ratelimit status + logging.info('Ratelimit allowed requests: ' + mastodon.ratelimit_limit) + logging.info('Ratelimit remaining requests: ' + mastodon.ratelimit_remaining) + logging.info('Ratelimit reset time: ' + time.localtime(mastodon.ratelimit_reset)) + logging.info('Ratelimit last call: ' + time.localtime(mastodon.ratelimit_lastcall)) + return mastodon