Skip to content

Commit

Permalink
Re #11292 Fixing error with non-standard file extension not propa-
Browse files Browse the repository at this point in the history
gating properly
  • Loading branch information
abuts committed Mar 10, 2015
1 parent 211070a commit 870d551
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
@@ -1,6 +1,6 @@
""" Sample LET reduction script """
""" Sample LET reduction script """
import os
os.environ["PATH"] = r"c:/Mantid/Code/builds/br_master/bin/Release;"+os.environ["PATH"]
#os.environ["PATH"] = r"c:/Mantid/Code/builds/br_master/bin/Release;"+os.environ["PATH"]


from Direct.ReductionWrapper import *
Expand Down Expand Up @@ -291,4 +291,4 @@ def custom_name(prop_man):
#if not rez:
# raise RuntimeError("validation failed with error: {0}".format(mess))
#else:
# print "ALL Fine"
# print "ALL Fine"
Expand Up @@ -623,7 +623,7 @@ def get_ei(self, data_run, ei_guess):

data_ws = data_run.get_workspace()
monitor_ws = data_run.get_monitors_ws()
if not monitor_ws:
if monitor_ws is None:
raise RuntimeError("Can not find monitors workspace for workspace {0}, run N{1}".\
format(data_ws.name(),data_ws.getRunNumber()))
separate_monitors = data_run.is_monws_separate()
Expand Down
9 changes: 8 additions & 1 deletion Code/Mantid/scripts/Inelastic/Direct/RunDescriptor.py
Expand Up @@ -410,13 +410,20 @@ def _set_single_run(self,instance,run_number,file_path='',fext=None,default_fext
self._clear_all()
# clear all would invalidate run number and workspace number
self._run_number = int(run_number)
self._ws_name = self._build_ws_name()
self._run_file_path = file_path
self._fext = fext
self._ws_name = self._build_ws_name()
else: # nothing to do, there is workspace, which corresponds to this run number
# and it may be already loaded (may be not). Just nullify run list
# in case of previous workspace name came from a list.
self._run_list = None
if not self._ws_name in mtd:
# Change existing file path and file extension if alternatives are provided
if len(file_path)>0:
self._run_file_path = file_path
if not fext is None:
self._fext = fext



#--------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 870d551

Please sign in to comment.