mailr16001 - /branches/uf_redesign/gui/wizard_elements.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 05, 2012 - 21:17:
Author: bugman
Date: Sat May  5 21:17:03 2012
New Revision: 16001

URL: http://svn.gna.org/viewcvs/relax?rev=16001&view=rev
Log:
The List objects can now handle bad user input.


Modified:
    branches/uf_redesign/gui/wizard_elements.py

Modified: branches/uf_redesign/gui/wizard_elements.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard_elements.py?rev=16001&r1=16000&r2=16001&view=diff
==============================================================================
--- branches/uf_redesign/gui/wizard_elements.py (original)
+++ branches/uf_redesign/gui/wizard_elements.py Sat May  5 21:17:03 2012
@@ -375,8 +375,17 @@
         @rtype:     list of str
         """
 
-        # Convert and return the value.
-        return gui_to_list(self._field.GetValue())
+        # The value.
+        value = self._field.GetValue()
+
+        # Convert, handling bad user behaviour.
+        try:
+            value = gui_to_list(value)
+        except:
+            value = []
+
+        # Return the value.
+        return value
 
 
     def ResetChoices(self, combo_choices=None, combo_data=None, 
combo_default=None):




Related Messages


Powered by MHonArc, Updated Sat May 05 21:20:02 2012