Commit e7a6afa8 authored by Toshio Kuratomi's avatar Toshio Kuratomi

Fix race condition with the http server used in unittests

--HG--
branch : distribute
extra : rebase_source : e7093c7a63fe91ede0bdd52735e33ac780e95ec6
parent 7210ba84
......@@ -32,7 +32,10 @@ class IndexServer(HTTPServer):
def stop(self):
"""self.shutdown is not supported on python < 2.6"""
self._run = False
urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port)
try:
urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port, None, 5)
except urllib2.URLError:
pass
self.thread.join()
def base_url(self):
......
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