Skip to content

Commit 68351a6

Browse files
committed
deal with non-existing sysctls in firewall detection
1 parent 4adb7b1 commit 68351a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libioc/Firewall.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ def ensure_firewall_enabled(self) -> None:
6363
return
6464

6565
try:
66-
for key in self._required_sysctl_properties:
67-
current = freebsd_sysctl.Sysctl(key).value
66+
current = "not found"
67+
for key in requirements:
6868
expected = requirements[key]
69+
current = freebsd_sysctl.Sysctl(key).value
6970
if current == expected:
7071
raise ValueError(
7172
f"Invalid Sysctl {key}: "

0 commit comments

Comments
 (0)