Author: bugman Date: Wed Apr 9 13:50:52 2008 New Revision: 5492 URL: http://svn.gna.org/viewcvs/relax?rev=5492&view=rev Log: Bug fix for the return_molecule() function. Empty MoleculeContainers are skipped to avoid returning them. Modified: 1.3/generic_fns/selection.py Modified: 1.3/generic_fns/selection.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/selection.py?rev=5492&r1=5491&r2=5492&view=diff ============================================================================== --- 1.3/generic_fns/selection.py (original) +++ 1.3/generic_fns/selection.py Wed Apr 9 13:50:52 2008 @@ -721,6 +721,10 @@ mol_num = 0 mol_container = None for mol in relax_data_store[pipe].mol: + # Skip empty MoleculeContainers. + if mol.is_empty(): + continue + # Skip the molecule if there is no match to the selection. if mol not in select_obj: continue