[Erp5-report] r17430 - /erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Nov 7 04:07:04 CET 2007


Author: yo
Date: Wed Nov  7 04:07:03 2007
New Revision: 17430

URL: http://svn.erp5.org?rev=17430&view=rev
Log:
Use the original _compile against FSPythonScript.

Modified:
    erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py

Modified: erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py?rev=17430&r1=17429&r2=17430&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py (original)
+++ erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py Wed Nov  7 04:07:03 2007
@@ -763,11 +763,12 @@
       PythonScript_compile(self)
     return PythonScript_exec(self, *args)
   PythonScript._exec = _exec
+  # Filesystem Python Script inherits from PythonScript, but
+  # the behavior is a bit inconsistent, and hard to override
+  # correctly. So just get back the original _compile. Note
+  # that _exec is overridden, so no need to recover.
   from Products.CMFCore.FSPythonScript import FSPythonScript
-  FSPythonScript_write = FSPythonScript._write
-  def _write(self, text, compile):
-    return FSPythonScript_write(self, text, 0)
-  FSPythonScript._write = _write
+  FSPythonScript._compile = PythonScript_compile
 
 
 optimize()




More information about the Erp5-report mailing list