mailr8088 - /branches/spectral_errors/specific_fns/base_class.py


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

Header


Content

Posted by edward on December 01, 2008 - 18:56:
Author: bugman
Date: Mon Dec  1 18:56:47 2008
New Revision: 8088

URL: http://svn.gna.org/viewcvs/relax?rev=8088&view=rev
Log:
Fix for the return_value() base class method.

The index should be tested against None!


Modified:
    branches/spectral_errors/specific_fns/base_class.py

Modified: branches/spectral_errors/specific_fns/base_class.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/spectral_errors/specific_fns/base_class.py?rev=8088&r1=8087&r2=8088&view=diff
==============================================================================
--- branches/spectral_errors/specific_fns/base_class.py (original)
+++ branches/spectral_errors/specific_fns/base_class.py Mon Dec  1 18:56:47 
2008
@@ -247,21 +247,21 @@
             # Get the value.
             if hasattr(spin, object_name):
                 value = getattr(spin, object_name)
-                if index:
+                if index != None:
                     value = value[index]
             elif hasattr(cdp, object_name):
                 value = getattr(cdp, object_name)
-                if index:
+                if index != None:
                     value = value[index]
 
             # Get the error.
             if hasattr(spin, object_error):
                 error = getattr(spin, object_error)
-                if index:
+                if index != None:
                     error = error[index]
             elif hasattr(cdp, object_error):
                 error = getattr(cdp, object_error)
-                if index:
+                if index != None:
                     error = error[index]
 
         # Simulation value.
@@ -269,12 +269,12 @@
             # Get the value.
             if hasattr(spin, object_sim):
                 object = getattr(spin, object_sim)
-                if index:
+                if index != None:
                     object = object[index]
                 value = object[sim]
             elif hasattr(cdp, object_sim):
                 object = getattr(cdp, object_sim)
-                if index:
+                if index != None:
                     object = object[index]
                 value = object[sim]
 




Related Messages


Powered by MHonArc, Updated Mon Dec 01 19:20:02 2008