Skip to content

Commit

Permalink
Allow full data path to be given with folders having dots
Browse files Browse the repository at this point in the history
The issue of the system test was related that the ubuntu and mac os path name
had a folder with a dot. And the input was expecting only a file_name'.'extension.

Now, if it finds more than one dot, it will get only the last one to split
the file - extension.

re #7221
  • Loading branch information
gesnerpassos committed Jun 24, 2013
1 parent 7b65077 commit 9cb09fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Code/Mantid/scripts/SANS/isis_reduction_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ def _extract_run_details(self, run_string, is_trans=False, prefix='', run_number
@param run_number_width: ISIS instruments often produce files with a fixed number of digits padded with zeros
"""
pieces = run_string.split('.')
if len(pieces) > 2:
# this means that the foldername has '.', so costruct the pieces to ignore foldername with '.'
extension = pieces[-1]
body = '.'.join(pieces[:-1])
pieces = [body, extension]
if len(pieces) != 2:
raise RuntimeError, "Invalid run specified: " + run_string + ". Please use RUNNUMBER.EXT format"

Expand Down

0 comments on commit 9cb09fa

Please sign in to comment.