get rid of ValueError

This commit is contained in:
Jörg Thalheim
2024-09-03 18:07:36 +02:00
parent 403b9cf2cc
commit f18771364c
11 changed files with 34 additions and 22 deletions

View File

@@ -217,7 +217,7 @@ def main() -> None:
case "network":
if args.network_id is None:
msg = "network_id parameter is required"
raise ValueError(msg)
raise ClanError(msg)
controller = create_network_controller()
identity = controller.identity
network_id = controller.networkid
@@ -227,7 +227,7 @@ def main() -> None:
network_id = args.network_id
case _:
msg = f"unknown mode {args.mode}"
raise ValueError(msg)
raise ClanError(msg)
ip = compute_zerotier_ip(network_id, identity)
args.identity_secret.write_text(identity.private)