Skip to content

Commit

Permalink
refs #9387 This should fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Apr 29, 2014
1 parent d79230e commit 6b529f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Code/Mantid/scripts/Inelastic/CommonFunctions.py
@@ -1,5 +1,6 @@
import mantid
from mantid.simpleapi import *
from mantid import api
import os
import string

Expand All @@ -18,6 +19,13 @@ def create_resultname(run_number, prefix='', suffix=''):
"""Create a string based on the run number and optional prefix and
suffix.
"""
if type(run_number) is api._api.MatrixWorkspace:
run_number = run_number.getRunNumber();
elif type(run_number) is str:
if run_number in mtd:
pws = mtd[run_number];
run_number = pws.getRunNumber();

if type(run_number) == list:
name = create_resultname(run_number[0], prefix, suffix)
elif type(run_number) == int:
Expand Down

0 comments on commit 6b529f6

Please sign in to comment.