Fix basic config not throwing missing key exception when no default passed

This commit is contained in:
allegroai 2021-01-05 18:54:13 +02:00
parent e29ad4c9b2
commit 641ed1b510
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class BasicConfig:
def get(self, key: str, default: Any = NotSet) -> Any:
value = self._config.get(key, default)
if value is self.NotSet and not default:
if value is self.NotSet:
raise KeyError(
f"Unable to find value for key '{key}' and default value was not provided."
)

View File

@ -38,7 +38,7 @@ class BasicConfig:
def get(self, key, default=NotSet):
value = self._config.get(key, default)
if value is self.NotSet and not default:
if value is self.NotSet:
raise KeyError(
f"Unable to find value for key '{key}' and default value was not provided."
)