Skip to content

Commit

Permalink
Check before trying to load MON file. Refs #9616.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Jun 10, 2014
1 parent ab087ef commit bff5556
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Code/Mantid/scripts/SANS/isis_reduction_steps.py
Expand Up @@ -2247,6 +2247,11 @@ def _read_mon_line(self, details, reducer):
filepath = filepath[idx + 1:]
if not os.path.isabs(filepath):
filepath = reducer.user_file_path+'/'+filepath

# If a filepath has been provided, then it must exist to continue.
if filepath and not os.path.isfile(filepath):
raise RuntimeError("The following MON/DIRECT datafile does not exist: %s" % filepath)

type = parts[0]
parts = type.split("/")
if len(parts) == 1:
Expand Down

0 comments on commit bff5556

Please sign in to comment.