mailr15189 - /branches/spec_api/specific_fns/api_objects.py


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

Header


Content

Posted by edward on January 19, 2012 - 11:32:
Author: bugman
Date: Thu Jan 19 11:32:54 2012
New Revision: 15189

URL: http://svn.gna.org/viewcvs/relax?rev=15189&view=rev
Log:
Fix for the Param_list.get_conv_factor() method - the function type was not 
properly handled.


Modified:
    branches/spec_api/specific_fns/api_objects.py

Modified: branches/spec_api/specific_fns/api_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/spec_api/specific_fns/api_objects.py?rev=15189&r1=15188&r2=15189&view=diff
==============================================================================
--- branches/spec_api/specific_fns/api_objects.py (original)
+++ branches/spec_api/specific_fns/api_objects.py Thu Jan 19 11:32:54 2012
@@ -22,6 +22,9 @@
 
 # Module docstring.
 """A module of special objects used within the specific function API."""
+
+# Python module imports.
+from types import FunctionType
 
 # relax module imports.
 from relax_errors import RelaxError
@@ -116,8 +119,8 @@
             return None
 
         # Function.
-        if isinstance(self._conv_factor[name], func):
-            return func()
+        if isinstance(self._conv_factor[name], FunctionType):
+            return self._conv_factor[name]()
 
         # Value.
         return self._conv_factor[name]




Related Messages


Powered by MHonArc, Updated Thu Jan 19 11:40:02 2012