Author: bugman Date: Thu Jan 24 11:23:12 2013 New Revision: 18294 URL: http://svn.gna.org/viewcvs/relax?rev=18294&view=rev Log: Modified the initial testing of the rdc.set_errors and pcs.set_errors user functions. This is to better indicate to the user what the problem is and why the user function cannot operate. Modified: trunk/generic_fns/pcs.py trunk/generic_fns/rdc.py Modified: trunk/generic_fns/pcs.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/pcs.py?rev=18294&r1=18293&r2=18294&view=diff ============================================================================== --- trunk/generic_fns/pcs.py (original) +++ trunk/generic_fns/pcs.py Thu Jan 24 11:23:12 2013 @@ -685,8 +685,12 @@ if not exists_mol_res_spin_data(): raise RelaxNoSequenceError + # Test if PCS data exists. + if not hasattr(cdp, 'pcs_ids'): + raise RelaxNoPCSError() + # Test if data corresponding to 'align_id' exists. - if not hasattr(cdp, 'pcs_ids') or (align_id and align_id not in cdp.pcs_ids): + if align_id and align_id not in cdp.pcs_ids: raise RelaxNoPCSError(align_id) # Arg check. Modified: trunk/generic_fns/rdc.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/rdc.py?rev=18294&r1=18293&r2=18294&view=diff ============================================================================== --- trunk/generic_fns/rdc.py (original) +++ trunk/generic_fns/rdc.py Thu Jan 24 11:23:12 2013 @@ -725,8 +725,12 @@ if not exists_mol_res_spin_data(): raise RelaxNoSequenceError + # Test if RDC data exists. + if not hasattr(cdp, 'rdc_ids'): + raise RelaxNoRDCError() + # Test if data corresponding to 'align_id' exists. - if not hasattr(cdp, 'rdc_ids') or (align_id and align_id not in cdp.rdc_ids): + if align_id and align_id not in cdp.rdc_ids: raise RelaxNoRDCError(align_id) # Arg check.