Skip to content

Commit

Permalink
use sys.exit
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonm23 authored Feb 4, 2024
1 parent 77014df commit ed32656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions slideshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def on_key_release(symbol, modifiers):

if key.Q == symbol or key.ESCAPE == symbol:
window.close()
pyglet.app.exit()
sys.exit()

elif key.SPACE == symbol:
toggle_pause()
Expand Down Expand Up @@ -659,7 +659,7 @@ def on_resize(width,height):

if args_dir and args_dir == '-h' or args_dir == '--help;':
print(help_usage, file=sys.stderr)
exit(0)
sys.exit(0)


if args_dir:
Expand All @@ -672,7 +672,7 @@ def on_resize(width,height):

if len(image_paths) < 1:
print(f"No images found in source", file=sys.stderr)
exit(1)
sys.exit(1)
else:
saved_image_paths = image_paths.copy()
image_filename = image_paths[image_index]
Expand Down Expand Up @@ -726,4 +726,4 @@ def on_resize(width,height):
print("There was an error")
print(e)

quit()
sys.exit()

0 comments on commit ed32656

Please sign in to comment.