mirror of https://gitlab.com/bashrc2/epicyon
Handle error when downloading announce
parent
132db64f0b
commit
b1d690e267
5
posts.py
5
posts.py
|
@ -5351,6 +5351,11 @@ def download_announce(session, base_dir: str, http_prefix: str,
|
||||||
base_dir, nickname, domain, post_id,
|
base_dir, nickname, domain, post_id,
|
||||||
recent_posts_cache)
|
recent_posts_cache)
|
||||||
return None
|
return None
|
||||||
|
if announced_json.get('error'):
|
||||||
|
print('Attempt to download announce returned an error ' +
|
||||||
|
post_json_object['object'] + ' ' +
|
||||||
|
str(announced_json))
|
||||||
|
return None
|
||||||
if not announced_json.get('id'):
|
if not announced_json.get('id'):
|
||||||
print('WARN: announced post does not have an id ' +
|
print('WARN: announced post does not have an id ' +
|
||||||
str(announced_json))
|
str(announced_json))
|
||||||
|
|
Loading…
Reference in New Issue