diff --git a/rpp/browser.py b/rpp/browser.py index 0c50b9a..e0106e7 100644 --- a/rpp/browser.py +++ b/rpp/browser.py @@ -144,6 +144,7 @@ def running(self) -> bool: stderr=subprocess.PIPE, shell=True, text=True, + check=True, ) out = result.stdout.strip() return bool(out) diff --git a/rpp/manager.py b/rpp/manager.py index 73e2d8c..c86bf2c 100644 --- a/rpp/manager.py +++ b/rpp/manager.py @@ -160,7 +160,7 @@ def __presence_thread(self, presence: Presence) -> None: except Exception as exc: self.log.error("Error running %s: %s", presence.name, exc) - def __runtime_thread(self, callback: typing.Callable) -> None: + def __runtime_thread(self, callback: typing.Callable) -> typing.Any: """ Run the runtime in a thread. @@ -188,8 +188,8 @@ def __runtime_thread(self, callback: typing.Callable) -> None: "%s stopped because the runtime was closed.", presence.name ) return callback() - else: - self.log.warning("No callback found.") + self.log.warning("No callback found.") + return None def download_presence(self, presence_name: str) -> None: """ @@ -360,7 +360,7 @@ def start(self) -> None: try: self.run_presences() if self.web_enabled: - self.run_runtime(None) + self.run_runtime() while not self.stop_event.is_set(): time.sleep(0.1) except KeyboardInterrupt: