Skip to content

Commit

Permalink
Replaced exit() with sys.exit(1) (#58)
Browse files Browse the repository at this point in the history
* Replaced exit() with sys.exit()

* Replaced exit() with sys.exit(1)
  • Loading branch information
Amarjit0511 authored Mar 19, 2023
1 parent 6c3e441 commit 4be7122
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GUI/GUI.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from GUI.GUIObjects import Button, TextBox, Toggle
import music.musicTimer as musicTimer # stop music thread in this file
import chapters
import sys

from colorama import Fore
import random
Expand Down Expand Up @@ -180,7 +181,7 @@ def text_until_enter(self, text: str):
def exit_func(self):
musicTimer.musicTimerObj.cancel() # stop music thread, make sure to call these 2 lines every time program exits
musicTimer.musicTimerObj.join()
exit()
sys.exit(1)

def start_screen(self):
if not self.run_gui:
Expand Down

0 comments on commit 4be7122

Please sign in to comment.