Author: bugman Date: Fri Jan 18 10:46:36 2013 New Revision: 18211 URL: http://svn.gna.org/viewcvs/relax?rev=18211&view=rev Log: Fix for the bug caught by the N_state_model.test_mc_sim_failure system test. If no RDC error is present, then the returned error from the N-state model analysis specific method return_error() is None. Modified: trunk/specific_fns/n_state_model.py Modified: trunk/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/n_state_model.py?rev=18211&r1=18210&r2=18211&view=diff ============================================================================== --- trunk/specific_fns/n_state_model.py (original) +++ trunk/specific_fns/n_state_model.py Fri Jan 18 10:46:36 2013 @@ -2270,8 +2270,14 @@ if not hasattr(container, 'rdc_err'): raise RelaxError("The RDC errors are missing for the spin pair '%s' and '%s'." % (container.spin_id1, container.spin_id2)) + # No data. + if data_id[2] not in container.rdc_err: + err = None + else: + err = container.rdc_err[data_id[2]] + # Append the data. - mc_errors.append(container.rdc_err[data_id[2]]) + mc_errors.append(err) # NOESY data. elif data_id[1] == 'noesy' and hasattr(container, 'noesy'):