mailr17667 - /trunk/relax_io.py


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

Header


Content

Posted by edward on October 02, 2012 - 15:18:
Author: bugman
Date: Tue Oct  2 15:18:32 2012
New Revision: 17667

URL: http://svn.gna.org/viewcvs/relax?rev=17667&view=rev
Log:
Python 3 bug fix for the relax_io.read_spin_data() function.

The built in max() function cannot handle the value of None, therefore the 
filter() function is used
to remove all instances of None from the list.


Modified:
    trunk/relax_io.py

Modified: trunk/relax_io.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax_io.py?rev=17667&r1=17666&r2=17667&view=diff
==============================================================================
--- trunk/relax_io.py (original)
+++ trunk/relax_io.py Tue Oct  2 15:18:32 2012
@@ -516,7 +516,7 @@
         raise RelaxError("If the 'spin_id_col' argument has been supplied, 
then the mol_name_col, res_name_col, res_num_col, spin_name_col, and 
spin_num_col must all be set to None.")
 
     # Minimum number of columns.
-    min_col_num = max(spin_id_col, mol_name_col, res_num_col, res_name_col, 
spin_num_col, spin_name_col, data_col, error_col)
+    min_col_num = max(filter(None, [spin_id_col, mol_name_col, res_num_col, 
res_name_col, spin_num_col, spin_name_col, data_col, error_col]))
 
     # Extract the data from the file.
     if not file_data:




Related Messages


Powered by MHonArc, Updated Tue Oct 02 15:20:02 2012