Skip to content

Commit

Permalink
[LOGGER]: Log when target architype is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
amadolid committed Oct 15, 2024
1 parent d3117dc commit b5c004f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jac-cloud/jac_cloud/core/architype.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,11 @@ def __get_class__(cls: type[TBA], name: str) -> type[TBA]:
jac_classes: dict[str, Any] | None = getattr(cls, "__jac_classes__", None)
if not jac_classes or not (jac_class := jac_classes.get(name)):
jac_classes = cls.__set_classes__()
jac_class = jac_classes.get(name, cls)
if (jac_class := jac_classes.get(name)) is None:
logger.warning(
f"Can't find {cls.__name__} {name}. Defaulting to base {cls.__name__}."
)
return cls

return jac_class

Expand Down

0 comments on commit b5c004f

Please sign in to comment.