Author: bugman Date: Fri Dec 17 11:12:52 2010 New Revision: 11851 URL: http://svn.gna.org/viewcvs/relax?rev=11851&view=rev Log: Fix for the API base method _return_value_general() - not all values have errors associated with them. Modified: branches/peak_list_handling/specific_fns/api_common.py Modified: branches/peak_list_handling/specific_fns/api_common.py URL: http://svn.gna.org/viewcvs/relax/branches/peak_list_handling/specific_fns/api_common.py?rev=11851&r1=11850&r2=11851&view=diff ============================================================================== --- branches/peak_list_handling/specific_fns/api_common.py (original) +++ branches/peak_list_handling/specific_fns/api_common.py Fri Dec 17 11:12:52 2010 @@ -299,22 +299,30 @@ # The spin value. if hasattr(spin, object_name): value = getattr(spin, object_name) - error = getattr(spin, object_error) + + # The error. + if hasattr(spin, object_error): + error = getattr(spin, object_error) # The global value. elif hasattr(cdp, object_name): value = getattr(cdp, object_name) - error = getattr(cdp, object_error) + + # The error. + if hasattr(cdp, object_error): + error = getattr(cdp, object_error) # List object. if index != None: value = value[index] - error = error[index] + if error: + error = error[index] # Dictionary object. if key: value = value[key] - error = error[key] + if error: + error = error[key] # Return the data. if sim == None: