From 3dd981727b5a3d1a6d5d63a5b1cb9060c2baf0e7 Mon Sep 17 00:00:00 2001 From: Muayyad alsadi Date: Sun, 13 Mar 2022 10:08:48 +0300 Subject: [PATCH] fix pylint --- podman_compose.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index b578aeb..1cd80d2 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1701,7 +1701,7 @@ def compose_wait(compose, args): @cmd_run(podman_compose, "systemd") -def compose_systemd(compose, args): +def compose_systemd(compose, args): # pylint: disable=unused-argument """ create systemd unit file and register its compose stacks @@ -1715,7 +1715,7 @@ def compose_systemd(compose, args): fn = os.path.expanduser(f"~/{stacks_dir}/{proj_name}.env") os.makedirs(os.path.dirname(fn), exist_ok=True) print(f"writing [{fn}]: ...") - with open(fn, "w") as f: + with open(fn, "w", encoding="utf-8") as f: for k, v in compose.environ.items(): if k.startswith("COMPOSE_") or k.startswith("PODMAN_"): f.write(f"{k}={v}\n") @@ -1736,7 +1736,7 @@ Description=%i rootless pod (podman-compose) [Service] Type=simple EnvironmentFile=%h/{stacks_dir}/%i.env -ExecStartPre={script} up --no-start +ExecStartPre-={script} up --no-start ExecStartPre=/usr/bin/podman pod start pod_%i ExecStart={script} wait ExecStop=/usr/bin/podman pod stop pod_%i @@ -1746,7 +1746,7 @@ WantedBy=default.target """ if os.access(os.path.dirname(fn), os.W_OK): print(f"writing [{fn}]: ...") - with open(fn, "w") as f: + with open(fn, "w", encoding="utf-8") as f: f.write(out) print(f"writing [{fn}]: done.") print(