added default at subnet question

This commit is contained in:
duffyduck 2026-03-04 22:30:15 +01:00
parent 82ddb25c01
commit aea2d82f27
1 changed files with 5 additions and 3 deletions

View File

@ -50,11 +50,13 @@ class RescueNetwork:
self.bridge = user_input self.bridge = user_input
# Ask for rescue subnet # Ask for rescue subnet
default_subnet = "10.99.99.0/24"
while True: while True:
subnet_input = input(" Emergency Subnetz (z.B. 10.99.99.0/24): ").strip() subnet_input = input(
f" Emergency Subnetz [{default_subnet}]: "
).strip()
if not subnet_input: if not subnet_input:
print(" Abgebrochen.") subnet_input = default_subnet
return None
try: try:
subnet = ipaddress.ip_network(subnet_input, strict=False) subnet = ipaddress.ip_network(subnet_input, strict=False)
self.rescue_subnet = str(subnet) self.rescue_subnet = str(subnet)