chore: access context items safely
This commit is contained in:
parent
d212e7a8a3
commit
8edfbc030c
1 changed files with 2 additions and 1 deletions
|
@ -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}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue