main.py don't except KeyboardException on AudioController blocking

This commit is contained in:
norohind 2022-11-13 14:27:05 +03:00
parent 226cd6180a
commit 507ad8878c
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

11
main.py
View File

@ -39,12 +39,9 @@ callback = AudioController.SessionCreateCallback(audio_controller)
mgr.RegisterSessionNotification(callback)
mgr.GetSessionEnumerator()
try:
audio_controller.start_blocking()
audio_controller.start_blocking()
except KeyboardInterrupt:
pass
mgr.UnregisterSessionNotification(callback)
audio_controller.pre_shutdown()
finally:
mgr.UnregisterSessionNotification(callback)
audio_controller.pre_shutdown()
logger.trace(f'Shutdown completed')