From ce8e9ffc900cf66a5207c17145e2805796955c59 Mon Sep 17 00:00:00 2001 From: jeripeierSBB Date: Fri, 1 Jan 2021 14:18:17 +0100 Subject: [PATCH] fix: let function_calls.py work with python 3.5 (#1253) --- components/gpio_control/function_calls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/gpio_control/function_calls.py b/components/gpio_control/function_calls.py index c4918b590..b87f96b8b 100644 --- a/components/gpio_control/function_calls.py +++ b/components/gpio_control/function_calls.py @@ -6,7 +6,9 @@ logger = logging.getLogger(__name__) -playout_control = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.absolute(), "../../scripts/playout_controls.sh")) +playout_control_relative_path = "../../scripts/playout_controls.sh" +function_calls_absolute_path = str(pathlib.Path(__file__).parent.absolute()) +playout_control = os.path.abspath(os.path.join(function_calls_absolute_path, playout_control_relative_path)) def functionCallShutdown(*args): function_call("{command} -c=shutdown".format(command=playout_control), shell=True)