[CMF-checkins] CVS: CMF - FSPythonScript.py:1.12

shane@digicool.com shane@digicool.com
Wed, 13 Jun 2001 09:47:38 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak.digicool.com:/tmp/cvs-serv4973

Modified Files:
	FSPythonScript.py 
Log Message:
Corrected a potential race condition in initialization.



--- Updated File FSPythonScript.py in package CMF --
--- FSPythonScript.py	2001/06/11 14:46:14	1.11
+++ FSPythonScript.py	2001/06/13 13:47:37	1.12
@@ -256,16 +256,14 @@
         # This ensures func_code and func_defaults are
         # set when the code hasn't been compiled yet,
         # just in time for mapply().  Truly odd, but so is mapply(). :P
-        self.func_defaults = None  # Overrides this method.
         self._write(self._source, 1)
-        return self.func_defaults
+        return self.__dict__.get('func_defaults', None)
     func_defaults = ComputedAttribute(func_defaults, 1)
 
     def func_code(self):
         # See func_defaults.
-        self.func_code = None  # Overrides this method.
         self._write(self._source, 1)
-        return self.func_code
+        return self.__dict__.get('func_code', None)
     func_code = ComputedAttribute(func_code, 1)