refactor(playout): use pathlib to build the path

This commit is contained in:
jo 2022-07-16 23:24:29 +02:00 committed by Kyle Robbertze
parent 2bc7d64cc4
commit 8ef6784a39
1 changed files with 4 additions and 4 deletions

View File

@ -13,6 +13,8 @@ from loguru import logger
from .entrypoint import generate_entrypoint
from .version import get_liquidsoap_version
here = Path(__file__).parent
@click.command(context_settings={"auto_envvar_prefix": DEFAULT_ENV_PREFIX})
@cli_logging_options()
@ -27,14 +29,12 @@ def cli(log_level: int, log_filepath: Optional[Path]):
version = get_liquidsoap_version()
script_path = os.path.join(
os.path.dirname(__file__), f"{version[0]}.{version[1]}", "ls_script.liq"
)
script_path = here / f"{version[0]}.{version[1]}/ls_script.liq"
exec_args = [
"/usr/bin/liquidsoap",
"libretime-liquidsoap",
"--verbose",
script_path,
str(script_path),
]
if log_level.is_debug():
exec_args.append("--debug")