From 19a209c75af5a611333302255ad680b7cf559374 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 16 Sep 2025 14:06:14 +0200 Subject: [PATCH] cli/templates: only catch `ClanError` --- pkgs/clan-cli/clan_lib/templates/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/clan-cli/clan_lib/templates/__init__.py b/pkgs/clan-cli/clan_lib/templates/__init__.py index 2f6251939..ca2fe4069 100644 --- a/pkgs/clan-cli/clan_lib/templates/__init__.py +++ b/pkgs/clan-cli/clan_lib/templates/__init__.py @@ -2,6 +2,7 @@ import logging from dataclasses import dataclass from clan_lib.dirs import clan_templates +from clan_lib.errors import ClanError from clan_lib.flake import Flake from clan_lib.nix_models.clan import ClanTemplatesType @@ -35,8 +36,7 @@ def list_templates(flake: Flake | None) -> TemplateList: builtin_templates = flake.select("clanInternals.templates") return TemplateList(builtin_templates, custom_templates) - - except (AttributeError, KeyError, Exception): + except ClanError: log.debug( "Failed to get templates from clan inputs, " "falling back to clan-core builtin templates",