[Erp5-report] r41931 kazuhiko - in /erp5/trunk/products/TimerService/timerserver: ./ timers...

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Jan 2 22:09:20 CET 2011


Author: kazuhiko
Date: Sun Jan  2 22:09:19 2011
New Revision: 41931

URL: http://svn.erp5.org?rev=41931&view=rev
Log:
make timerserver works in Zope-2.12 too.

Modified:
    erp5/trunk/products/TimerService/timerserver/setup.py
    erp5/trunk/products/TimerService/timerserver/timerserver/TimerServer.py
    erp5/trunk/products/TimerService/timerserver/version.txt

Modified: erp5/trunk/products/TimerService/timerserver/setup.py
URL: http://svn.erp5.org/erp5/trunk/products/TimerService/timerserver/setup.py?rev=41931&r1=41930&r2=41931&view=diff
==============================================================================
--- erp5/trunk/products/TimerService/timerserver/setup.py [utf8] (original)
+++ erp5/trunk/products/TimerService/timerserver/setup.py [utf8] Sun Jan  2 22:09:19 2011
@@ -23,7 +23,7 @@ except ImportError:
   from distutils.core import setup
 
 setup(name='timerserver',
-      version='2.0',
+      version=version,
       license='GPL',
       description='Timer Server for Zope',
       long_description='',

Modified: erp5/trunk/products/TimerService/timerserver/timerserver/TimerServer.py
URL: http://svn.erp5.org/erp5/trunk/products/TimerService/timerserver/timerserver/TimerServer.py?rev=41931&r1=41930&r2=41931&view=diff
==============================================================================
--- erp5/trunk/products/TimerService/timerserver/timerserver/TimerServer.py [utf8] (original)
+++ erp5/trunk/products/TimerService/timerserver/timerserver/TimerServer.py [utf8] Sun Jan  2 22:09:19 2011
@@ -15,6 +15,7 @@ from ZServer.PubCore import handle
 from ZPublisher.BaseRequest import BaseRequest
 from ZPublisher.BaseResponse import BaseResponse
 from ZPublisher.HTTPRequest import HTTPRequest
+from ZPublisher.HTTPResponse import HTTPResponse
 import ZPublisher.HTTPRequest
 
 class TimerServer:
@@ -147,3 +148,17 @@ class TimerRequest(HTTPRequest):
 
         env['PATH_INFO']= '/Control_Panel/timer_service/process_timer'
         return env
+
+    def clone(self):
+        # This method is a dumb copy of Zope-2.8's one that makes timerserver
+        # works in Zope-2.12 too.
+        #
+        # Return a clone of the current request object
+        # that may be used to perform object traversal.
+        environ = self.environ.copy()
+        environ['REQUEST_METHOD'] = 'GET'
+        if self._auth:
+            environ['HTTP_AUTHORIZATION'] = self._auth
+        clone = HTTPRequest(None, environ, HTTPResponse(), clean=1)
+        clone['PARENTS'] = [self['PARENTS'][-1]]
+        return clone

Modified: erp5/trunk/products/TimerService/timerserver/version.txt
URL: http://svn.erp5.org/erp5/trunk/products/TimerService/timerserver/version.txt?rev=41931&r1=41930&r2=41931&view=diff
==============================================================================
--- erp5/trunk/products/TimerService/timerserver/version.txt [utf8] (original)
+++ erp5/trunk/products/TimerService/timerserver/version.txt [utf8] Sun Jan  2 22:09:19 2011
@@ -1 +1 @@
-0.2
+2.0.1



More information about the Erp5-report mailing list