From 7d461546aa7e0deb3be7b8659a7658df728ae64e Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Thu, 19 Nov 2020 00:54:21 +0100 Subject: [PATCH] Add 1 as valid exit code for pod exists check --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index c7c7141..9f4bf93 100644 --- a/main.py +++ b/main.py @@ -54,7 +54,7 @@ class PodKeeper: def run(self): os.chdir(self.podhome) - if self.stop_previous and podman.pod.exists(self.podname).exit_code == 0: + if self.stop_previous and podman.pod.exists(self.podname, _ok_code=[0, 1]).exit_code == 0: print(f"Stopping pod {self.podname}", file=sys.stderr, flush=True) podman.pod.stop(self.podname)