Commits

Anonymous committed 7075314

Fix race condition with the http server used in unittests

Comments (0)

Files changed (1)

setuptools/tests/server.py

     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):