diff --git a/patroni/callback_executor.py b/patroni/callback_executor.py index e937d9eb..718af67a 100644 --- a/patroni/callback_executor.py +++ b/patroni/callback_executor.py @@ -1,5 +1,4 @@ import logging -import os import subprocess from threading import Event, Lock, Thread @@ -31,7 +30,7 @@ class CallbackExecutor(Thread): self._callback_event.clear() with self._lock: try: - self._process = subprocess.Popen(self._cmd, close_fds=True, env={'PATH': os.environ.get('PATH')}) + self._process = subprocess.Popen(self._cmd, close_fds=True) except Exception: logger.exception('Failed to execute %s', self._cmd) continue