From 01d28265c9f02e98e08a4fc056175e548376a70c Mon Sep 17 00:00:00 2001 From: Linus2punkt0 Date: Thu, 14 Sep 2023 09:49:44 +0200 Subject: [PATCH] Fixed issues resulting from code running without a db file --- crosspost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crosspost.py b/crosspost.py index 5ee557e..fbe6721 100644 --- a/crosspost.py +++ b/crosspost.py @@ -406,7 +406,7 @@ def jsonWrite(skeet, tweet, toot, failed): def jsonRead(): database = {} if not os.path.exists(databasePath): - return + return database with open(databasePath, 'r') as file: for line in file: jsonLine = json.loads(line)