From 023056b5d5df40563e72245413ba6d3243b14d60 Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 10 Jul 2019 10:43:56 +1000 Subject: [PATCH] fix potential keyerror --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 7942daa..663aa93 100755 --- a/main.py +++ b/main.py @@ -174,7 +174,7 @@ for f in following: #we've caught up to the notices we've already downloaded, so we can stop now #you might be wondering, "lynne, what if the instance ratelimits you after 40 posts, and they've made 60 since main.py was last run? wouldn't the bot miss 20 posts and never be able to see them?" to which i reply, "i know but i don't know how to fix it" done = True - if cfg['lang']: + if 'lang' in cfg: try: if oi['object']['contentMap'][cfg['lang']]: # filter for language insert_toot(oi, f, toot, c)