mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
897c633b37
commit
7d9556b8d4
20
posts.py
20
posts.py
|
@ -6115,21 +6115,23 @@ def populate_replies_json(base_dir: str, nickname: str, domain: str,
|
||||||
def _reject_announce(announce_filename: str,
|
def _reject_announce(announce_filename: str,
|
||||||
base_dir: str, nickname: str, domain: str,
|
base_dir: str, nickname: str, domain: str,
|
||||||
announce_post_id: str, recent_posts_cache: {},
|
announce_post_id: str, recent_posts_cache: {},
|
||||||
debug: bool):
|
debug: bool) -> None:
|
||||||
"""Marks an announce as rejected
|
"""Marks an announce as rejected
|
||||||
"""
|
"""
|
||||||
reject_post_id(base_dir, nickname, domain, announce_post_id,
|
reject_post_id(base_dir, nickname, domain, announce_post_id,
|
||||||
recent_posts_cache, debug)
|
recent_posts_cache, debug)
|
||||||
|
|
||||||
# reject the post referenced by the announce activity object
|
# reject the post referenced by the announce activity object
|
||||||
if not os.path.isfile(announce_filename + '.reject'):
|
if os.path.isfile(announce_filename + '.reject'):
|
||||||
try:
|
return
|
||||||
with open(announce_filename + '.reject', 'w+',
|
|
||||||
encoding='utf-8') as fp_reject_announce:
|
try:
|
||||||
fp_reject_announce.write('\n')
|
with open(announce_filename + '.reject', 'w+',
|
||||||
except OSError:
|
encoding='utf-8') as fp_reject_announce:
|
||||||
print('EX: _reject_announce unable to write ' +
|
fp_reject_announce.write('\n')
|
||||||
announce_filename + '.reject')
|
except OSError:
|
||||||
|
print('EX: _reject_announce unable to write ' +
|
||||||
|
announce_filename + '.reject')
|
||||||
|
|
||||||
|
|
||||||
def download_announce(session, base_dir: str, http_prefix: str,
|
def download_announce(session, base_dir: str, http_prefix: str,
|
||||||
|
|
Loading…
Reference in New Issue