MCPcopy Index your code
hub / github.com/saltstack/salt / _check_systemctl

Function _check_systemctl

tests/integration/modules/test_timezone.py:22–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21
22def _check_systemctl():
23 if not hasattr(_check_systemctl, "memo"):
24 if not salt.utils.platform.is_linux():
25 _check_systemctl.memo = False
26 else:
27 proc = subprocess.run(["timedatectl"], capture_output=True, check=False)
28 _check_systemctl.memo = b"No such file or directory" in proc.stderr
29 return _check_systemctl.memo
30
31
32@pytest.mark.skipif(_check_systemctl(), reason="systemctl degraded")

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected