mailr16684 - /1.3/data/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 June 06, 2012 - 10:40:
Author: bugman
Date: Wed Jun  6 10:40:19 2012
New Revision: 16684

URL: http://svn.gna.org/viewcvs/relax?rev=16684&view=rev
Log:
Bug fix for the loading of the molecule name and type from relax state or 
results files.

The str() builtin function is now used to convert the string from unicode to 
a normal string.  This
is needed as u'My mol' != 'My mol', breaking a number of tests!


Modified:
    1.3/data/mol_res_spin.py

Modified: 1.3/data/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/mol_res_spin.py?rev=16684&r1=16683&r2=16684&view=diff
==============================================================================
--- 1.3/data/mol_res_spin.py (original)
+++ 1.3/data/mol_res_spin.py Wed Jun  6 10:40:19 2012
@@ -738,10 +738,10 @@
         # Loop over the molecules.
         for mol_node in mol_nodes:
             # Get the molecule details and add the molecule to the 
MoleculeList structure.
-            name = mol_node.getAttribute('name')
+            name = str(mol_node.getAttribute('name'))
             if name == 'None':
                 name = None
-            type = mol_node.getAttribute('type')
+            type = str(mol_node.getAttribute('type'))
             if type == 'None':
                 type = None
             self.add_item(mol_name=name, mol_type=type)




Related Messages


Powered by MHonArc, Updated Wed Jun 06 11:00:01 2012