You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
diffrent way of shutdown catch
This commit is contained in:
@@ -305,7 +305,10 @@ def main():
|
||||
log_file_path.touch()
|
||||
|
||||
core = RadioPlayer((" ".join(sys.argv[1:]) if len(sys.argv) > 1 else None), open(log_file_path, "w"))
|
||||
atexit.register(core.shutdown)
|
||||
core.start()
|
||||
signal.signal(signal.SIGINT, core.handle_sigint)
|
||||
core.loop()
|
||||
try:
|
||||
core.start()
|
||||
signal.signal(signal.SIGINT, core.handle_sigint)
|
||||
core.loop()
|
||||
except SystemExit:
|
||||
core.shutdown()
|
||||
raise
|
||||
Reference in New Issue
Block a user