Fix systemd.enabled on Rocky 8

This commit is contained in:
Daniel A. Wozniak 2025-01-16 14:55:09 -07:00 committed by Daniel Wozniak
parent 786db9bbbb
commit 1a97786516

View file

@ -172,7 +172,10 @@ def _pid_to_service_systemctl(pid):
systemd_cmd = ["systemctl", "--output", "json", "status", str(pid)] systemd_cmd = ["systemctl", "--output", "json", "status", str(pid)]
try: try:
systemd_output = subprocess.run( systemd_output = subprocess.run(
systemd_cmd, check=True, text=True, capture_output=True systemd_cmd,
check=True,
text=True,
capture_output=True,
) )
status_json = salt.utils.json.find_json(systemd_output.stdout) status_json = salt.utils.json.find_json(systemd_output.stdout)
except (ValueError, subprocess.CalledProcessError): except (ValueError, subprocess.CalledProcessError):