Skip to content

Commit

Permalink
raise when missing config
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Jul 3, 2024
1 parent 8ed7d5e commit d921c21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/anemoi/registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ def config():

config = load_config().get("registry")
if not config:
LOG.warning(f"No 'registry' section in config. Config is {load_config()}. Limited functionalities.")
raise ValueError("Section 'registry' is missing in config.")
return config
2 changes: 1 addition & 1 deletion src/anemoi/registry/commands/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def run_take_one(self, args):
data = self._retrieve_task_list(take_one, args.sort)
uuids = [v["uuid"] for v in data]
if not uuids:
print("No tasks found")
LOG.info("No tasks found")
return
latest = uuids[-1]

Expand Down

0 comments on commit d921c21

Please sign in to comment.