fix potential keyerror

This commit is contained in:
Lynne 2019-07-10 10:43:56 +10:00
parent 068ea7242f
commit 023056b5d5
1 changed files with 1 additions and 1 deletions

View File

@ -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)