0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 21:53:54 +01:00

proper module shutdown

This commit is contained in:
2025-12-09 21:53:25 +01:00
parent 4cb33cd6cf
commit 9139ed589e

View File

@@ -129,7 +129,12 @@ class RadioPlayer:
def shutdown(self):
self.procman.stop_all()
[module.shutdown() for module in self.simple_modules if module]
for module in self.simple_modules:
if module:
try: module.shutdown()
except Exception:
traceback.print_last(file=self.logger.output)
self.logger.error("Exception while shutting down module.")
self.logger.output.close()
def handle_sigint(self, signum: int, frame: types.FrameType | None):