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:
|
||||
read_file.seek(0, 0)
|
||||
read_file.write(post_id + content)
|
||||
except Exception as ex:
|
||||
except OSError as ex:
|
||||
print('EX: Failed to mark post as read' + str(ex))
|
||||
else:
|
||||
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.write(approve_handle_full + '\n' +
|
||||
content)
|
||||
except Exception as ex:
|
||||
except OSError as ex:
|
||||
print('WARN: Manual follow accept. ' +
|
||||
'Failed to write entry to followers file ' + str(ex))
|
||||
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:
|
||||
post_html = file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
except OSError as ex:
|
||||
print('ERROR: load_individual_post_as_html_from_cache ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
# no sleep
|
||||
|
|
Loading…
Reference in New Issue