Skip to content
Snippets Groups Projects
Commit f1a14149 authored by Nick Bearson's avatar Nick Bearson
Browse files

add a check for file existence

parent 7e3d4c19
No related branches found
No related tags found
1 merge request!11Resolve "make error messages more descriptive"
...@@ -152,6 +152,11 @@ def grid_setup(args, work_dir=os.getcwd()): ...@@ -152,6 +152,11 @@ def grid_setup(args, work_dir=os.getcwd()):
exit(0) exit(0)
args.filenames = fileglob args.filenames = fileglob
for f in args.filenames:
if not os.path.exists(f):
log.error("Tried to grid file that does not exist: {}".format(f))
exit(1)
try: try:
start_time, end_time = get_start_end(args.filenames) start_time, end_time = get_start_end(args.filenames)
except ValueError: except ValueError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment