mailr16369 - /branches/uf_redesign/gui/string_conv.py


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

Header


Content

Posted by edward on May 22, 2012 - 10:54:
Author: bugman
Date: Tue May 22 10:54:27 2012
New Revision: 16369

URL: http://svn.gna.org/viewcvs/relax?rev=16369&view=rev
Log:
Fix for the new py_to_gui() function.


Modified:
    branches/uf_redesign/gui/string_conv.py

Modified: branches/uf_redesign/gui/string_conv.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/string_conv.py?rev=16369&r1=16368&r2=16369&view=diff
==============================================================================
--- branches/uf_redesign/gui/string_conv.py (original)
+++ branches/uf_redesign/gui/string_conv.py Tue May 22 10:54:27 2012
@@ -369,26 +369,30 @@
     """
 
     # No input.
+    if value == None:
+        string = ''
+
+    # All other types.
+    else:
+        string = unicode(value)
+
+    # Return the GUI string.
+    return string
+
+
+def str_to_gui(string):
+    """Convert the string into the GUI string.
+
+    @param string:  The string or None to convert.
+    @type string:   str or None
+    @return:        The GUI string.
+    @rtype:         unicode
+    """
+
+    # No input.
     if string == None:
         string = ''
 
-    # Return the unicode version of the string.
-    return unicode(string)
-
-
-def str_to_gui(string):
-    """Convert the string into the GUI string.
-
-    @param string:  The string or None to convert.
-    @type string:   str or None
-    @return:        The GUI string.
-    @rtype:         unicode
-    """
-
-    # No input.
-    if string == None:
-        string = ''
-
     # Convert.
     return unicode(string)
 




Related Messages


Powered by MHonArc, Updated Tue May 22 11:00:02 2012