Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/earthkit/data/sources/fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ def __init__(self, *args, stream=True, **kwargs):
self.request.update(a)
self.request.update(kwargs)

fdb_home = os.environ.get("FDB_HOME", None)
fdb_conf = os.environ.get("FDB5_CONFIG", None)
if fdb_home is None and fdb_conf is None:
fdb5_home = os.environ.get("FDB5_HOME", None)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FDB5_DIR can also be used to locate the library

fdb5_conf = os.environ.get("FDB5_CONFIG", None)
fdb5_config_file = os.environ.get("FDB5_CONFIG_FILE", None)
if fdb5_home is None or (fdb5_conf is None and fdb5_config_file is None):
raise ValueError(
"""Neither FDB_HOME nor FDB5_CONFIG environment variable
was set! Please define either one to access FDB.
"""FDB5_HOME and either FDB5_CONFIG or FDB5_CONFIG_FILE need to be set.
See: https://fields-database.readthedocs.io for details about FDB."""
)

Expand Down