You've already forked RadioPlayer
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:
@@ -129,7 +129,12 @@ class RadioPlayer:
|
|||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
self.procman.stop_all()
|
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()
|
self.logger.output.close()
|
||||||
|
|
||||||
def handle_sigint(self, signum: int, frame: types.FrameType | None):
|
def handle_sigint(self, signum: int, frame: types.FrameType | None):
|
||||||
|
|||||||
Reference in New Issue
Block a user