Check that user feed exists

main
Bob Mottram 2023-01-19 18:44:18 +00:00
parent fd5cfa4016
commit afb8aabf3e
1 changed files with 9 additions and 5 deletions

View File

@ -530,6 +530,7 @@ def _get_posts(session, outbox_url: str, max_posts: int,
session, outbox_url, as_header, session, outbox_url, as_header,
project_version, http_prefix, project_version, http_prefix,
origin_domain, debug) origin_domain, debug)
if user_feed:
for item in user_feed: for item in user_feed:
result.append(item) result.append(item)
i += 1 i += 1
@ -813,6 +814,9 @@ def _get_posts_for_blocked_domains(base_dir: str,
user_feed = parse_user_feed(signing_priv_key_pem, user_feed = parse_user_feed(signing_priv_key_pem,
session, outbox_url, as_header, session, outbox_url, as_header,
project_version, http_prefix, domain, debug) project_version, http_prefix, domain, debug)
if not user_feed:
return blocked_posts
for item in user_feed: for item in user_feed:
i += 1 i += 1
if i > max_posts: if i > max_posts: