mirror of https://github.com/scrapy/scrapy.git
bind mockserver to 0.0.0.0, to listen on all 127.* range (useful for testing broad crawls)
This commit is contained in:
parent
9361c89573
commit
36ee36000e
|
|
@ -80,7 +80,7 @@ class Root(Resource):
|
|||
if __name__ == "__main__":
|
||||
root = Root()
|
||||
factory = Site(root)
|
||||
port = reactor.listenTCP(8998, factory, interface="127.0.0.1")
|
||||
port = reactor.listenTCP(8998, factory)
|
||||
def print_listening():
|
||||
h = port.getHost()
|
||||
print "Mock server running at http://%s:%d" % (h.host, h.port)
|
||||
|
|
|
|||
Loading…
Reference in New Issue