Skip to content

Commit

Permalink
more exception catching
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Sep 8, 2023
1 parent f864a44 commit a3bea66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cat_win/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def edit_file(file_index: int = 0) -> None:
except PermissionError:
err_print(f"Permission denied! Skipping {holder.files[file_index].displayname} ...")
return
except BlockingIOError:
except (BlockingIOError, FileNotFoundError):
err_print('Resource blocked/unavailable! Skipping ' + \
f"{holder.files[file_index].displayname} ...")
return
Expand Down
2 changes: 1 addition & 1 deletion cat_win/util/zipviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ def display_zip(file: str, size_converter) -> bool:
print(f"{name.ljust(length_list[0])} " + \
f"{size.rjust(length_list[1])} {csize.rjust(length_list[2])}")
return True
except zipfile.BadZipfile:
except (zipfile.BadZipfile, OSError):
return False

0 comments on commit a3bea66

Please sign in to comment.