Author: bugman Date: Wed Jun 20 01:33:02 2012 New Revision: 16992 URL: http://svn.gna.org/viewcvs/relax?rev=16992&view=rev Log: Bug fix for the relax_data.copy user function - it can now handle spins without relaxation data. Modified: trunk/generic_fns/relax_data.py Modified: trunk/generic_fns/relax_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/relax_data.py?rev=16992&r1=16991&r2=16992&view=diff ============================================================================== --- trunk/generic_fns/relax_data.py (original) +++ trunk/generic_fns/relax_data.py Wed Jun 20 01:33:02 2012 @@ -446,6 +446,10 @@ # Alias the spin containers. spin_from = dp_from.mol[mol_index].res[res_index].spin[spin_index] spin_to = dp_to.mol[mol_index].res[res_index].spin[spin_index] + + # No data or errors. + if not hasattr(spin_from, 'ri_data') and not hasattr(spin_from, 'ri_data_err'): + continue # Initialise the spin data if necessary. if not hasattr(spin_to, 'ri_data'):