Commit 0fd3769e authored by Alexandre Boeglin's avatar Alexandre Boeglin

replace urllib by socket, as urllib ignores the no_proxy environment variable,

and we don't want to go through the proxy here (as we just want to check
availability of a server running on the same machine, same processus,
different thread)

git-svn-id: 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c101296
......@@ -6,7 +6,7 @@ __version__ = 'TimerServer for Zope 0.1'
import traceback
import thread
import sys, os, errno, time, socket, urllib
import sys, os, errno, time, socket
from StringIO import StringIO
from zLOG import LOG, INFO
......@@ -55,12 +55,15 @@ class TimerServer:
# To be very sure, try to connect to the HTTPServer
# and only start after we are able to connect
while 1:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
urllib.urlopen('http://%s:%s' %(ip, port))
except IOError:
s.connect((ip, port))
except (socket.error, socket.timeout):
module = self.module
interval = self.interval
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment