Author: bugman Date: Fri May 4 10:03:22 2012 New Revision: 15951 URL: http://svn.gna.org/viewcvs/relax?rev=15951&view=rev Log: Expanded and fixed the argument checking for the prompt auto-generated user function front ends. Modified: branches/uf_redesign/prompt/objects.py Modified: branches/uf_redesign/prompt/objects.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/objects.py?rev=15951&r1=15950&r2=15951&view=diff ============================================================================== --- branches/uf_redesign/prompt/objects.py (original) +++ branches/uf_redesign/prompt/objects.py Fri May 4 10:03:22 2012 @@ -24,6 +24,7 @@ """Module containing the special objects for auto-generating the user functions and classes.""" # relax module imports. +import arg_check from prompt.base_class import _bold_text, _build_subtitle, _format_text, _strip_lead from prompt.help import relax_class_help from relax_errors import RelaxError @@ -98,6 +99,10 @@ # Check if the correct Python object type has been supplied. if self._kargs[i]['py_type'] == 'str': arg_check.is_str(value, self._kargs[i]['desc_short']) + elif self._kargs[i]['py_type'] == 'str_list': + arg_check.is_str_list(value, self._kargs[i]['desc_short']) + else: + raise RelaxError("The Python object type '%s' is unknown." % self._kargs[i]['py_type']) # Store the value. values.append(value)