mailr19961 - /trunk/pipe_control/value.py


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

Header


Content

Posted by edward on June 07, 2013 - 23:57:
Author: bugman
Date: Fri Jun  7 23:57:07 2013
New Revision: 19961

URL: http://svn.gna.org/viewcvs/relax?rev=19961&view=rev
Log:
Fixes for the value.write user function for simple parameter values of None.

This is a recently introduced bug which causes a complete failure of the user 
function is the
parameter for any spin is None.


Modified:
    trunk/pipe_control/value.py

Modified: trunk/pipe_control/value.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/value.py?rev=19961&r1=19960&r2=19961&view=diff
==============================================================================
--- trunk/pipe_control/value.py (original)
+++ trunk/pipe_control/value.py Fri Jun  7 23:57:07 2013
@@ -608,7 +608,7 @@
         spin_names.append(spin.name)
 
         # Dictionary type data.
-        if isinstance(value, dict):
+        if data_type == 'dict':
             # Initialise the lists.
             values.append([])
             errors.append([])
@@ -626,7 +626,7 @@
                     errors[-1].append(scale(error[key], scaling))
 
         # List type data.
-        elif isinstance(value, list):
+        elif data_type == 'list':
             # Initialise the lists.
             values.append([])
             errors.append([])
@@ -643,17 +643,6 @@
                 else:
                     errors[-1].append(scale(error[i], scaling))
 
-        # None.
-        elif value == None:
-            # Initialise the lists.
-            values.append([])
-            errors.append([])
-
-            # Loop over the data.
-            for i in range(len(data_names)):
-                values[-1].append(None)
-                errors[-1].append(None)
-
         # Simple values.
         else:
             # Append the scaled values and errors.




Related Messages


Powered by MHonArc, Updated Sat Jun 08 00:00:02 2013