This commit is contained in:
Kovid Goyal 2015-06-14 14:00:48 +05:30
parent 95075623d6
commit 5ef9def403

View File

@ -123,6 +123,9 @@ class LibraryServer(TestServer):
from calibre.srv.loop import ServerLoop from calibre.srv.loop import ServerLoop
from calibre.srv.handler import Handler from calibre.srv.handler import Handler
from calibre.srv.http_response import create_http_handler from calibre.srv.http_response import create_http_handler
kwargs['shutdown_timeout'] = kwargs.get('shutdown_timeout', 0.1)
kwargs['listen_on'] = kwargs.get('listen_on', 'localhost')
kwargs['port'] = kwargs.get('port', 0)
opts = Options(**kwargs) opts = Options(**kwargs)
self.libraries = libraries or (library_path,) self.libraries = libraries or (library_path,)
self.handler = Handler(self.libraries, opts, testing=True) self.handler = Handler(self.libraries, opts, testing=True)