()
| 20 | |
| 21 | |
| 22 | def _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") |