mailr15754 - /1.3/gui/misc.py


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

Header


Content

Posted by edward on April 17, 2012 - 15:35:
Author: bugman
Date: Tue Apr 17 15:35:14 2012
New Revision: 15754

URL: http://svn.gna.org/viewcvs/relax?rev=15754&view=rev
Log:
Fix for the gui_to_int() function for when a text instead of an int is given 
by the user.


Modified:
    1.3/gui/misc.py

Modified: 1.3/gui/misc.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/misc.py?rev=15754&r1=15753&r2=15754&view=diff
==============================================================================
--- 1.3/gui/misc.py (original)
+++ 1.3/gui/misc.py Tue Apr 17 15:35:14 2012
@@ -239,7 +239,10 @@
         return string
 
     # Convert.
-    val = eval(string)
+    try:
+        val = eval(string)
+    except:
+        val = None
 
     # Not an int!
     if not isinstance(val, int):




Related Messages


Powered by MHonArc, Updated Tue Apr 17 16:00:01 2012