mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix deprecation warning with newer versions of cherrypy
This commit is contained in:
parent
cad47638f8
commit
034ac65118
@ -155,7 +155,7 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache,
|
||||
|
||||
cherrypy.config.update({
|
||||
'log.screen' : opts.develop,
|
||||
'engine.autoreload_on' : getattr(opts,
|
||||
'engine.autoreload.on' : getattr(opts,
|
||||
'auto_reload', False),
|
||||
'tools.log_headers.on' : opts.develop,
|
||||
'tools.encode.encoding' : 'UTF-8',
|
||||
@ -178,7 +178,7 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache,
|
||||
# self.config['/'] = {
|
||||
# 'tools.sessions.on' : True,
|
||||
# 'tools.sessions.timeout': 60, # Session times out after 60 minutes
|
||||
#}
|
||||
# }
|
||||
|
||||
if not wsgi:
|
||||
self.setup_loggers()
|
||||
@ -322,5 +322,3 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache,
|
||||
return self.db.search_getting_ids(
|
||||
(query or '').strip(), self.search_restriction,
|
||||
sort_results=False, use_virtual_library=False)
|
||||
|
||||
|
||||
|
@ -74,7 +74,7 @@ class Server(object):
|
||||
@cherrypy.expose
|
||||
def controls_test(self, **kwargs):
|
||||
self.form_data = kwargs.copy()
|
||||
#pprint.pprint(kwargs)
|
||||
# pprint.pprint(kwargs)
|
||||
return pprint.pformat(kwargs)
|
||||
|
||||
@cherrypy.expose
|
||||
@ -129,11 +129,11 @@ class Test(unittest.TestCase):
|
||||
cherrypy.config.update({
|
||||
'log.screen' : False,
|
||||
'checker.on' : False,
|
||||
'engine.autoreload_on' : False,
|
||||
'engine.autoreload.on' : False,
|
||||
'request.show_tracebacks': True,
|
||||
'server.socket_host' : b'127.0.0.1',
|
||||
'server.socket_port' : cls.port,
|
||||
'server.socket_timeout' : 10, #seconds
|
||||
'server.socket_timeout' : 10, # seconds
|
||||
'server.thread_pool' : 5, # number of threads setting to 1 causes major slowdown
|
||||
'server.shutdown_timeout': 0.1, # minutes
|
||||
})
|
||||
@ -238,4 +238,3 @@ def run():
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user