Skip to content

Commit

Permalink
Allow for property & function isValid types. Refs #6677
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Mar 14, 2013
1 parent 39a4113 commit d53698c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Code/Mantid/Framework/PythonInterface/mantid/simpleapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ def algorithm_wrapper(*args, **kwargs):
for p in _algm_object.mandatoryProperties():
prop = _algm_object.getProperty(p)
# Mandatory parameters are those for which the default value is not valid
if len(str(prop.isValid))>0:
if isinstance(prop.isValid,str):
valid_str = prop.isValid
else:
valid_str = prop.isValid()
if len(valid_str) > 0:
arg_list.append(p)
else:
# None is not quite accurate here, but we are reproducing the
Expand Down

0 comments on commit d53698c

Please sign in to comment.