chore: access context items safely

This commit is contained in:
Timothy Quilling 2023-06-30 01:33:19 -04:00
parent d212e7a8a3
commit 8edfbc030c

View file

@ -397,7 +397,8 @@ def get_all_known_context_urls(server, reply_toots, parsed_urls):
parsed_url = parse_url(url, parsed_urls) parsed_url = parse_url(url, parsed_urls)
context = get_toot_context(parsed_url[0], parsed_url[1], url) context = get_toot_context(parsed_url[0], parsed_url[1], url)
if context is not None: if context is not None:
known_context_urls.update(context) # type: ignore for item in context:
known_context_urls.add(item)
else: else:
log(f"Error getting context for toot {url}") log(f"Error getting context for toot {url}")