mailr8859 - /branches/bmrb/bmrblib/misc.py


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

Header


Content

Posted by edward on February 22, 2009 - 19:47:
Author: bugman
Date: Sun Feb 22 19:47:09 2009
New Revision: 8859

URL: http://svn.gna.org/viewcvs/relax?rev=8859&view=rev
Log:
Bug fix for the translate function.  The old list was being overwritten.


Modified:
    branches/bmrb/bmrblib/misc.py

Modified: branches/bmrb/bmrblib/misc.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/misc.py?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- branches/bmrb/bmrblib/misc.py (original)
+++ branches/bmrb/bmrblib/misc.py Sun Feb 22 19:47:09 2009
@@ -34,13 +34,16 @@
     # List data.
     if type(data) == list:
         # Loop over the data.
+        new_data = []
         for i in range(len(data)):
             if data[i] == None or data[i] == 'None':
-                data[i] = '?'
+                new_data.append('?')
+            else:
+                new_data.append(data[i])
 
     # None.
     if data == None:
-        data = '?'
+        new_data = '?'
 
     # Return the translated result.
-    return data
+    return new_data




Related Messages


Powered by MHonArc, Updated Sun Feb 22 20:00:02 2009