[Erp5-report] r9230 - /spec/mandriva/2006.0/zope-TimerService/TimerService-erp5.patch
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Aug 16 16:01:50 CEST 2006
Author: kevin
Date: Wed Aug 16 16:01:49 2006
New Revision: 9230
URL: http://svn.erp5.org?rev=9230&view=rev
Log:
Use urllib instead of Client
Modified:
spec/mandriva/2006.0/zope-TimerService/TimerService-erp5.patch
Modified: spec/mandriva/2006.0/zope-TimerService/TimerService-erp5.patch
URL: http://svn.erp5.org/spec/mandriva/2006.0/zope-TimerService/TimerService-erp5.patch?rev=9230&r1=9229&r2=9230&view=diff
==============================================================================
--- spec/mandriva/2006.0/zope-TimerService/TimerService-erp5.patch (original)
+++ spec/mandriva/2006.0/zope-TimerService/TimerService-erp5.patch Wed Aug 16 16:01:49 2006
@@ -1,6 +1,6 @@
diff -Naur TimerService-0.2.orig/TimerService/timerserver/TimerServer.py TimerService-0.2/TimerService/timerserver/TimerServer.py
--- TimerService-0.2.orig/TimerService/timerserver/TimerServer.py 2004-03-17 11:59:42.000000000 +0100
-+++ TimerService-0.2/TimerService/timerserver/TimerServer.py 2006-06-19 18:45:58.728147472 +0200
++++ TimerService-0.2/TimerService/timerserver/TimerServer.py 2006-08-16 15:59:04.135826728 +0200
@@ -1,12 +1,12 @@
# -*- coding: UTF-8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
@@ -12,23 +12,14 @@
import thread
-import sys, os, errno, time
-+import sys, os, errno, time, socket
++import sys, os, errno, time, socket, urllib
from StringIO import StringIO
from zLOG import LOG, INFO
-@@ -14,6 +14,7 @@
- from ZPublisher.BaseRequest import BaseRequest
- from ZPublisher.BaseResponse import BaseResponse
- from ZPublisher.HTTPRequest import HTTPRequest
-+from ZPublisher import Client
-
- class TimerServer:
- def __init__(self, module, interval=600):
-@@ -35,6 +36,34 @@
+@@ -35,6 +35,33 @@
'\tInterval: %s seconds.\n'%(time.ctime(time.time()), interval))
def run(self):
-+
+ # wait until the zhttp_server exist in socket_map
+ # because TimerService has to be started after the Zope HTTPServer
+ from asyncore import socket_map
@@ -51,15 +42,15 @@
+ while 1:
+ time.sleep(5)
+ try:
-+ Client.call('http://%s:%s' %(ip, port))
-+ except ValueError:
++ urllib.urlopen('http://%s:%s' %(ip, port))
++ except IOError:
+ continue
+ break
+
module = self.module
interval = self.interval
-@@ -67,7 +96,7 @@
+@@ -67,7 +94,7 @@
def unauthorized(self):
pass
@@ -70,7 +61,7 @@
diff -Naur TimerService-0.2.orig/TimerService/TimerService.py TimerService-0.2/TimerService/TimerService.py
--- TimerService-0.2.orig/TimerService/TimerService.py 2004-03-17 12:22:52.000000000 +0100
-+++ TimerService-0.2/TimerService/TimerService.py 2006-06-19 18:48:45.974722128 +0200
++++ TimerService-0.2/TimerService/TimerService.py 2006-08-16 15:57:43.477088720 +0200
@@ -1,9 +1,9 @@
# -*- coding: UTF-8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
More information about the Erp5-report
mailing list