mirror of
https://github.com/clearml/clearml-server
synced 2025-02-07 13:33:42 +00:00
Fix basic config not throwing missing key exception when no default passed
This commit is contained in:
parent
e29ad4c9b2
commit
641ed1b510
@ -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."
|
||||
)
|
||||
|
@ -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."
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user