Author: bugman Date: Thu Jan 15 10:17:58 2015 New Revision: 27191 URL: http://svn.gna.org/viewcvs/relax?rev=27191&view=rev Log: More robustness for the spin viewer GUI window update_*() 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 update_mol(), update_res() and update_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=27191&r1=27190&r2=27191&view=diff ============================================================================== --- trunk/gui/spin_viewer/tree.py (original) +++ trunk/gui/spin_viewer/tree.py Thu Jan 15 10:17:58 2015 @@ -932,6 +932,10 @@ # Get the python data. data = self.tree.GetItemPyData(key) + # No info. + if data == None: + continue + # Check the mol_id for a match and, if so, terminate to speed things up. if mol_id == data['id']: new_mol = False @@ -1004,6 +1008,10 @@ for key in self.tree_ids[mol_branch_id]: # Get the python data. data = self.tree.GetItemPyData(key) + + # No info. + if data == None: + continue # Check the res_id, res name, and res number for a match and, if so, terminate to speed things up. if res_id == data['id'] and res.name == data['res_name'] and res.num == data['res_num']: @@ -1081,6 +1089,10 @@ # Get the python data. data = self.tree.GetItemPyData(key) + # No info. + if data == None: + continue + # Check the spin_id, spin name and spin number for a match and, if so, terminate to speed things up. if spin_id == data['id'] and spin.name == data['spin_name'] and spin.num == data['spin_num']: new_spin = False _______________________________________________ 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