Development
This commit is contained in:
parent
a28c3e6bd3
commit
100f783462
1 changed files with 6 additions and 1 deletions
|
|
@ -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.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue