Skip to content

Commit b9f465d

Browse files
committed
Config loading: don't choke on falsy OPENEO_BACKEND_CONFIG
e.g.: also use default when OPENEO_BACKEND_CONFIG is emtpy string
1 parent 2126671 commit b9f465d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openeo_driver/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.58.1a1"
1+
__version__ = "0.58.2a1"

openeo_driver/config/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _default_config(self) -> ContextManager[Path]:
8585
def _load(self) -> OpenEoBackendConfig:
8686
"""Load the config from config file."""
8787
with self._default_config() as default_config:
88-
config_path = os.environ.get(self.OPENEO_BACKEND_CONFIG, default_config)
88+
config_path = os.environ.get(self.OPENEO_BACKEND_CONFIG) or default_config
8989
config = load_from_py_file(path=config_path, variable="config", expected_class=self.expected_class)
9090
if hasattr(config, "id"):
9191
_log.debug(f"Loaded config {config.id=}")

0 commit comments

Comments
 (0)