diff --git a/reg_chxr.py b/reg_chxr.py index 5fdfbc9..e5e31a8 100644 --- a/reg_chxr.py +++ b/reg_chxr.py @@ -23,7 +23,7 @@ logger.remove() logger.add(sys.stderr, format=logger_format) -__version__ = '1.0.1' +__version__ = '1.0.2' DISPLAY_TITLE = r""" _ _ @@ -105,6 +105,10 @@ def main(options: Namespace, inputdir: Path, outputdir: Path): with open(input_file, 'r') as file: data = json.load(file) + # null check + if len(data) == 0: + raise Exception(f"Cannot verify registration for empty pacs data.") + # for each individual series, check if total file count matches total file registered for series in data: pacs_search_params = sanitize_for_cube(series)