From 8eb75d69b93fd1944b3b96db02246bac09b5545c Mon Sep 17 00:00:00 2001 From: Sam Schott Date: Sun, 29 Oct 2023 18:07:23 +0100 Subject: [PATCH] Equivalent but simpler to read watchdog env variable logic --- src/maestral/daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maestral/daemon.py b/src/maestral/daemon.py index 018bdf4c7..65ba37b26 100644 --- a/src/maestral/daemon.py +++ b/src/maestral/daemon.py @@ -69,9 +69,9 @@ # systemd environment NOTIFY_SOCKET = os.getenv("NOTIFY_SOCKET") -WATCHDOG_PID = int(os.getenv("WATCHDOG_PID", os.getpid())) WATCHDOG_USEC = os.getenv("WATCHDOG_USEC") -IS_WATCHDOG = WATCHDOG_USEC and WATCHDOG_PID == os.getpid() +WATCHDOG_PID = os.getenv("WATCHDOG_PID") +IS_WATCHDOG = WATCHDOG_PID is None or WATCHDOG_PID == str(os.getpid()) URI = "PYRO:maestral.{0}@{1}"