mirror of https://gitlab.com/bashrc2/epicyon
Check that path exists
parent
0af6b09840
commit
0df15cca0e
2
posts.py
2
posts.py
|
@ -6154,9 +6154,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
|
||||||
|
|
||||||
announced_actor = announced_json['id']
|
announced_actor = announced_json['id']
|
||||||
if announced_json.get('attributedTo'):
|
if announced_json.get('attributedTo'):
|
||||||
announced_actor = get_attributed_to(announced_json['attributedTo'])
|
announced_actor = get_attributed_to(announced_json['attributedTo'])
|
||||||
|
|
||||||
if not announced_json.get('type'):
|
if not announced_json.get('type'):
|
||||||
print('WARN: announced post does not have a type ' +
|
print('WARN: announced post does not have a type ' +
|
||||||
str(announced_json))
|
str(announced_json))
|
||||||
|
|
3
utils.py
3
utils.py
|
@ -745,6 +745,9 @@ def get_locked_account(actor_json: {}) -> bool:
|
||||||
def has_users_path(path_str: str) -> bool:
|
def has_users_path(path_str: str) -> bool:
|
||||||
"""Whether there is a /users/ path (or equivalent) in the given string
|
"""Whether there is a /users/ path (or equivalent) in the given string
|
||||||
"""
|
"""
|
||||||
|
if not path_str:
|
||||||
|
return False
|
||||||
|
|
||||||
users_list = get_user_paths()
|
users_list = get_user_paths()
|
||||||
for users_str in users_list:
|
for users_str in users_list:
|
||||||
if users_str in path_str:
|
if users_str in path_str:
|
||||||
|
|
Loading…
Reference in New Issue