diff --git a/src/shelloracle/providers/__init__.py b/src/shelloracle/providers/__init__.py index 5c825ce..8ca845a 100644 --- a/src/shelloracle/providers/__init__.py +++ b/src/shelloracle/providers/__init__.py @@ -61,7 +61,10 @@ def __get__(self, instance: Provider, owner: type[Provider]) -> T: # inspect.get_members from determining the object type raise AttributeError("Settings must be accessed through a provider instance.") config = get_config() - return config["provider"][owner.name][self.name] + try: + return config["provider"][owner.name][self.name] + except KeyError: + return self.default def _providers() -> dict[str, type[Provider]]: