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

@@ -176,7 +176,7 @@ def set_service_instance(
if module_name not in service_keys:
msg = f"{module_name} is not a valid Service attribute. Expected one of {', '.join(service_keys)}."
raise ValueError(msg)
raise ClanError(msg)
inventory = load_inventory_json(base_path)
target_type = get_args(get_type_hints(Service)[module_name])[1]