1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-23 15:43:47 +00:00

Use communicate() instead of wait() after killing the mock server (#4095)

This commit is contained in:
Adrián Chaves 2019-10-31 13:31:33 +01:00 committed by GitHub
parent 15c55d0c1d
commit f02c3d1dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,8 +206,7 @@ class MockServer():
def __exit__(self, exc_type, exc_value, traceback):
self.proc.kill()
self.proc.wait()
time.sleep(0.2)
self.proc.communicate()
def url(self, path, is_secure=False):
host = self.http_address.replace('0.0.0.0', '127.0.0.1')