Skip to content

Commit

Permalink
Exit if zenodo config is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
fplazaonate committed Mar 29, 2024
1 parent 24f5f7a commit 73bd723
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion meteor/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import tarfile
import json
from typing import ClassVar
import sys


@dataclass
Expand All @@ -47,8 +48,9 @@ def load_catalogues_config() -> dict:
with importlib.resources.as_file(config_data) as configuration_path:
with configuration_path.open("rt", encoding="UTF-8") as config:
return json.load(config)
except AssertionError:
except FileNotFoundError:
logging.error("The file %s is missing in meteor source", Downloader.CONFIG_DATA_FILE.name)
sys.exit(1)

@staticmethod
def get_available_catalogues() -> list[str]:
Expand Down
4 changes: 2 additions & 2 deletions meteor/meteor.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,10 @@ def main() -> None: # pragma: no cover
"""
Main program function
"""
# Get arguments
args = get_arguments()
# Let us logging
logger = get_logging()
# Get arguments
args = get_arguments()
# version = importlib.metadata.version("meteor")
# print("Meteor version", version)
# Create a meteor dataset
Expand Down

0 comments on commit 73bd723

Please sign in to comment.