mirror of https://gitlab.com/bashrc2/epicyon
Exception types
parent
43a411581c
commit
4929598d0a
|
@ -182,7 +182,7 @@ def _mark_post_as_read(actor: str, post_id: str, post_category: str) -> None:
|
||||||
if post_id not in content:
|
if post_id not in content:
|
||||||
read_file.seek(0, 0)
|
read_file.seek(0, 0)
|
||||||
read_file.write(post_id + content)
|
read_file.write(post_id + content)
|
||||||
except Exception as ex:
|
except OSError as ex:
|
||||||
print('EX: Failed to mark post as read' + str(ex))
|
print('EX: Failed to mark post as read' + str(ex))
|
||||||
else:
|
else:
|
||||||
with open(read_posts_filename, 'w+', encoding='utf-8') as read_file:
|
with open(read_posts_filename, 'w+', encoding='utf-8') as read_file:
|
||||||
|
|
|
@ -293,7 +293,7 @@ def manual_approve_follow_request(session, session_onion, session_i2p,
|
||||||
followers_file.seek(0, 0)
|
followers_file.seek(0, 0)
|
||||||
followers_file.write(approve_handle_full + '\n' +
|
followers_file.write(approve_handle_full + '\n' +
|
||||||
content)
|
content)
|
||||||
except Exception as ex:
|
except OSError as ex:
|
||||||
print('WARN: Manual follow accept. ' +
|
print('WARN: Manual follow accept. ' +
|
||||||
'Failed to write entry to followers file ' + str(ex))
|
'Failed to write entry to followers file ' + str(ex))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ def load_individual_post_as_html_from_cache(base_dir: str,
|
||||||
with open(cached_post_filename, 'r', encoding='utf-8') as file:
|
with open(cached_post_filename, 'r', encoding='utf-8') as file:
|
||||||
post_html = file.read()
|
post_html = file.read()
|
||||||
break
|
break
|
||||||
except Exception as ex:
|
except OSError as ex:
|
||||||
print('ERROR: load_individual_post_as_html_from_cache ' +
|
print('ERROR: load_individual_post_as_html_from_cache ' +
|
||||||
str(tries) + ' ' + str(ex))
|
str(tries) + ' ' + str(ex))
|
||||||
# no sleep
|
# no sleep
|
||||||
|
|
Loading…
Reference in New Issue