From e8a5ec6493721e7ac64f1bede94bbb2193b336b5 Mon Sep 17 00:00:00 2001 From: spla Date: Fri, 9 Apr 2021 11:35:47 +0200 Subject: [PATCH] Fix bad indenting and add two seconds sleep --- mastofeeds.py | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mastofeeds.py b/mastofeeds.py index 758bbe4..2458230 100644 --- a/mastofeeds.py +++ b/mastofeeds.py @@ -3,6 +3,7 @@ import feedparser from mastodon import Mastodon import psycopg2 import sys +import time ############################################################################### # INITIALISATION @@ -111,6 +112,8 @@ if __name__ == '__main__': mastodon.status_post(toot_text, in_reply_to_id=None,) + time.sleep(2) + ######################################################### insert_line = 'INSERT INTO feeds(id, link) VALUES (%s, %s)' diff --git a/setup.py b/setup.py index 6d33c3e..8e6303d 100644 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ def log_in(): if os.path.exists("app_clientcred.txt"): print("Removing app_clientcred.txt temp file..") os.remove("app_clientcred.txt") - if os.path.exists("app_usercred.txt"): + if os.path.exists("app_usercred.txt"): print("Removing app_usercred.txt temp file..") os.remove("app_usercred.txt") print("Secrets setup done!\n")