From a15ba943daaacb60b83b5dc26400902af8d87239 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sun, 5 Nov 2023 18:31:08 +0800 Subject: [PATCH] fix: syncplay server errors --- Dockerfile | 2 ++ boot.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4542ce7..07a116d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ RUN cat /dev/null > requirements_gui.txt RUN SNAPCRAFT_PART_BUILD=1 pip wheel --wheel-dir /wheels/ ./ FROM ${PYTHON} AS syncplay +WORKDIR /wheels/ +RUN pip wheel PyYaml COPY --from=builder /wheels/ /wheels/ WORKDIR /release/local/lib/ RUN mkdir $(basename /usr/local/lib/python3.*/) && cd ./python3.*/ && \ diff --git a/boot.py b/boot.py index c337476..f514c59 100755 --- a/boot.py +++ b/boot.py @@ -23,7 +23,7 @@ def temp_file(file: str, content: str) -> str: """ Create and save content to temporary files. """ file = os.path.join('/tmp/', file) with open(file, 'w') as fp: - fp.write(f'{content}\n') + fp.write(content) return file @@ -67,7 +67,7 @@ def load_config(args: dict[str, Any], file: str) -> dict[str, Any]: def build_args(opts: dict): """ Construct the startup arguments for syncplay server. """ - args = ['--port', opts.get('port', '8999')] + args = ['--port', str(opts.get('port', 8999))] if 'password' in opts: args += ['--password', opts['password']] if 'motd' in opts: