wip unify rpitools with boxtools

install.py and router.py
This commit is contained in:
l_samenv
2024-03-19 11:42:50 +01:00
parent d6e68aef7d
commit 0a0009a096
2 changed files with 34 additions and 16 deletions

View File

@ -410,8 +410,9 @@ class Service:
try:
((prevline, prevports),) = pattern.findall(content)
except TypeError:
raise ValueError(f'{FIREWALL_CONF} does not contain expected pattern for open ports')
except (TypeError, ValueError):
print(f'{FIREWALL_CONF} does not contain expected pattern for open ports - firewall off?')
return
# parse previous port set
prevportset = {int(p) for p in prevports[1:-1].split(',')}