File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 11from functools import reduce
2- import glob
2+ from pathlib import Path
33import inspect
44from operator import getitem
55import os
@@ -144,7 +144,19 @@ def __init__(
144144 processing object
145145 """
146146
147- self .files = glob .glob (files )
147+ input_files_mask = Path (files ).parent
148+ if not input_files_mask .is_dir ():
149+ raise FileNotFoundError (
150+ "The configuration key data mask does not point to a valid directory."
151+ )
152+
153+ self .files = [
154+ file_path for file_path in input_files_mask .glob (input_files_mask .name )
155+ ]
156+ if len (self .files ) == 0 :
157+ raise FileNotFoundError (
158+ "No files can be found with the data mask provided in the configuration file."
159+ )
148160 self .runs = tuple (
149161 filter (
150162 lambda r : r .obs_id is not None ,
You can’t perform that action at this time.
0 commit comments