Author: bugman Date: Sun Nov 11 13:33:07 2007 New Revision: 3486 URL: http://svn.gna.org/viewcvs/relax?rev=3486&view=rev Log: Added a test for the existence of the target residue. Modified: 1.3/generic_fns/spin.py Modified: 1.3/generic_fns/spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/spin.py?rev=3486&r1=3485&r2=3486&view=diff ============================================================================== --- 1.3/generic_fns/spin.py (original) +++ 1.3/generic_fns/spin.py Sun Nov 11 13:33:07 2007 @@ -73,6 +73,13 @@ if spin_to_cont: raise RelaxError, "The spin " + `spin_to` + " already exists in the " + `pipe_from` + " data pipe." + # Get the single residue data container. + res_from_cont = return_residue(res_from, pipe_from) + + # No residue to copy data from. + if res_from_cont == None: + raise RelaxError, "The residue " + `res_from` + " does not exist in the " + `pipe_from` + " data pipe." + # Get the single spin data container. spin_from_cont = return_spin(spin_from, pipe_from)