chore: raise from specific exceptions

This commit is contained in:
jo 2023-02-01 20:38:58 +01:00 committed by Jonas L
parent 7c873edc19
commit 75bc72be6d
5 changed files with 6 additions and 6 deletions

View file

@ -83,7 +83,7 @@ def cli(log_level: str, log_filepath: Optional[Path], config_filepath: Optional[
logger.debug("Checking if Liquidsoap is running")
liq_version = liq_client.wait_for_version()
if not LIQUIDSOAP_MIN_VERSION <= liq_version:
raise Exception(f"Invalid liquidsoap version {liq_version}")
raise RuntimeError(f"Invalid liquidsoap version {liq_version}")
fetch_queue = Queue()
recorder_queue = Queue()

View file

@ -64,7 +64,7 @@ class PypoFile(Thread):
handle.write(chunk)
except HTTPError as exception:
raise Exception(
raise RuntimeError(
f"could not download file {media_item['id']}"
) from exception

View file

@ -18,7 +18,7 @@ def __timeout(func, timeout_duration, default, args, kwargs):
thread.join(timeout_duration)
if thread.is_alive():
raise Exception("Thread did not terminate")
raise RuntimeError("Thread did not terminate")
return thread.result