Skip to content

Commit

Permalink
Fix unlink incompatibility for real
Browse files Browse the repository at this point in the history
  • Loading branch information
schmelczer committed Jul 29, 2022
1 parent 8ab5de6 commit a8fa8fd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions great_ai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ def serve() -> None:
finally:
if args.file_name.endswith(".ipynb"):
try:
Path(get_script_name_of_notebook(args.file_name)).unlink(
missing_ok=True
)
Path(get_script_name_of_notebook(args.file_name)).unlink()
except FileNotFoundError:
# missing_ok only exists >= Python 3.8
pass
Expand Down Expand Up @@ -129,9 +127,7 @@ def stop_server(self) -> None:
restart_handler.stop_server()
if args.file_name.endswith(".ipynb"):
try:
Path(get_script_name_of_notebook(args.file_name)).unlink(
missing_ok=True
)
Path(get_script_name_of_notebook(args.file_name)).unlink()
except FileNotFoundError:
# missing_ok only exists >= Python 3.8
pass
Expand Down

0 comments on commit a8fa8fd

Please sign in to comment.