mailr10041 - /1.3/generic_fns/mol_res_spin.py


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

Header


Content

Posted by edward on December 02, 2009 - 14:38:
Author: bugman
Date: Wed Dec  2 14:38:47 2009
New Revision: 10041

URL: http://svn.gna.org/viewcvs/relax?rev=10041&view=rev
Log:
Fix for bug #14872 (https://gna.org/bugs/?14872).

This is the unicode selection bug reported by Olivier Serve <olivier dott 
serve att gmail dott com>.

The selection string is now converted to a normal string using str() if it is 
detected to be unicode.


Modified:
    1.3/generic_fns/mol_res_spin.py

Modified: 1.3/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=10041&r1=10040&r2=10041&view=diff
==============================================================================
--- 1.3/generic_fns/mol_res_spin.py (original)
+++ 1.3/generic_fns/mol_res_spin.py Wed Dec  2 14:38:47 2009
@@ -83,6 +83,10 @@
         @type select_string:    string
         """
 
+        # Handle Unicode.
+        if isinstance(select_string, unicode):
+            select_string = str(select_string)
+
         self._union = None
         self._intersect = None
 
@@ -1846,6 +1850,10 @@
     @rtype:             instance of the SpinContainer class.  If 
full_info=True, the type is the
                         tuple (SpinContainer, str, int, str).
     """
+
+    # Handle Unicode.
+    if isinstance(selection, unicode):
+        selection = str(selection)
 
     # The data pipe.
     if pipe == None:




Related Messages


Powered by MHonArc, Updated Wed Dec 02 15:00:02 2009