Author: bugman Date: Thu Jan 15 10:15:50 2015 New Revision: 27190 URL: http://svn.gna.org/viewcvs/relax?rev=27190&view=rev Log: More robustness for the spin viewer GUI window prune_*() methods.
When no spin data exists, the self.tree.GetItemPyData(key) call can return None. This is now being checked for and such None values are being skipped in the prune_mol(), prune_res() and prune_spin() methods. The problem was found in the Mf.test_bug_20479_gui_final_pipe system test when running the command: for i in {1..10}; do ./relax --gui-tests --time -d &>> gui_tests.log; done Modified: trunk/gui/spin_viewer/tree.py Modified: trunk/gui/spin_viewer/tree.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/tree.py?rev=27190&r1=27189&r2=27190&view=diff ============================================================================== --- trunk/gui/spin_viewer/tree.py (original) +++ trunk/gui/spin_viewer/tree.py Thu Jan 15 10:15:50 2015 @@ -740,6 +740,10 @@ # Get the python data. info = self.tree.GetItemPyData(key) + # No info. + if info == None: + continue + # Add to the prune list if it has been removed. if info['id'] not in mol_ids: prune_list.append(key) @@ -764,6 +768,10 @@ for key in self.tree_ids[mol_branch_id]: # Get the python data. info = self.tree.GetItemPyData(key) + + # No info. + if info == None: + continue # Get the residue. res = return_residue(info['id']) @@ -794,6 +802,10 @@ for key in self.tree_ids[mol_branch_id][res_branch_id]: # Get the python data. info = self.tree.GetItemPyData(key) + + # No info. + if info == None: + continue # Get the spin. spin = return_spin(info['id']) _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits