Development

This commit is contained in:
Matthew Grotke 2026-05-23 04:36:35 -04:00
parent a28c3e6bd3
commit 100f783462

View file

@ -226,7 +226,12 @@ def check_configurations(data):
non_wg = [v for v in vlans if not is_wg(v)]
wg_vlans = [v for v in vlans if is_wg(v)]
def file_ok(id_, name, path, severity="error", suggestion=""):
if not path.exists():
try:
exists = path.exists()
except PermissionError:
return _problem(id_, name, "warning",
f"{path}: permission denied — run with sudo for accurate status.")
if not exists:
return _problem(id_, name, severity,
f"{path} does not exist.",
suggestion or f"Run sudo python3 core.py --apply to create it.")