Author: bugman
Date: Thu Dec 11 16:23:46 2014
New Revision: 27093
URL: http://svn.gna.org/viewcvs/relax?rev=27093&view=rev
Log:
Bug fix for the lib.arg_check.is_int_list() function for checking a list of
lists.
This is used to check user function arguments, but was causing a RelaxError to
be raised for all
integer list of lists user function arguments when a valid value is supplied.
The function has been
updated to match the is_str_list() function which does not suffer from this bug.
Modified:
trunk/lib/arg_check.py
Modified: trunk/lib/arg_check.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/arg_check.py?rev=27093&r1=27092&r2=27093&view=diff
==============================================================================
--- trunk/lib/arg_check.py (original)
+++ trunk/lib/arg_check.py Thu Dec 11 16:23:46 2014
@@ -415,11 +415,11 @@
if can_be_none and arg == None:
return True
- # Not a list.
+ # Fail if not a list.
if not isinstance(arg, list):
fail = True
- # A list.
+ # Other checks.
else:
# Fail size is wrong.
if size != None and len(arg) != size:
@@ -439,11 +439,13 @@
if list_of_lists and isinstance(arg[i], list):
for j in range(len(arg[i])):
if not isinstance(arg[i][j], int):
+ print "here"
fail = True
- # Check if it is an integer.
- if not isinstance(arg[i], int):
- fail = True
+ # Simple list.
+ else:
+ if not isinstance(arg[i], int):
+ fail = True
# Fail.
if fail:
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits