mailr16064 - /branches/uf_redesign/gui/misc.py


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

Header


Content

Posted by edward on May 07, 2012 - 17:50:
Author: bugman
Date: Mon May  7 17:50:20 2012
New Revision: 16064

URL: http://svn.gna.org/viewcvs/relax?rev=16064&view=rev
Log:
Fix for the gui.misc.gui_to_tuple() function.

This was failing in many cases, especially where the value is not a tuple to 
start with.


Modified:
    branches/uf_redesign/gui/misc.py

Modified: branches/uf_redesign/gui/misc.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/misc.py?rev=16064&r1=16063&r2=16064&view=diff
==============================================================================
--- branches/uf_redesign/gui/misc.py (original)
+++ branches/uf_redesign/gui/misc.py Mon May  7 17:50:20 2012
@@ -361,8 +361,10 @@
 
     # Convert.
     val = eval(string)
-    if not isinstance(val, tuple):
+    if isinstance(val, list):
         val = tuple(val)
+    elif not isinstance(val, tuple):
+        val = (val,)
 
     # Return the list.
     return val




Related Messages


Powered by MHonArc, Updated Mon May 07 18:00:01 2012