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


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

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

Reply via email to