mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
aa58f3a559
commit
da8910bd90
@ -28,7 +28,7 @@ from calibre.library.server.ajax import AjaxServer
|
||||
from calibre import prints, as_unicode
|
||||
|
||||
|
||||
class DispatchController(object): # {{{
|
||||
class DispatchController(object): # {{{
|
||||
|
||||
def __init__(self, prefix, wsgi=False, auth_controller=None):
|
||||
self.dispatcher = cherrypy.dispatch.RoutesDispatcher()
|
||||
@ -71,7 +71,7 @@ class DispatchController(object): # {{{
|
||||
|
||||
# }}}
|
||||
|
||||
class BonJour(SimplePlugin): # {{{
|
||||
class BonJour(SimplePlugin): # {{{
|
||||
|
||||
def __init__(self, engine, port=8080, prefix=''):
|
||||
SimplePlugin.__init__(self, engine)
|
||||
@ -88,7 +88,6 @@ class BonJour(SimplePlugin): # {{{
|
||||
{'path':self.prefix+'/opds'}),
|
||||
]
|
||||
|
||||
|
||||
def start(self):
|
||||
zeroconf_ip_address = verify_ipV4_address(self.ip_address)
|
||||
try:
|
||||
@ -110,7 +109,6 @@ class BonJour(SimplePlugin): # {{{
|
||||
cherrypy.log.error('Failed to stop BonJour:')
|
||||
cherrypy.log.error(traceback.format_exc())
|
||||
|
||||
|
||||
stop.priority = 10
|
||||
|
||||
cherrypy.engine.bonjour = BonJour(cherrypy.engine)
|
||||
@ -161,9 +159,9 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache,
|
||||
'request.show_tracebacks': show_tracebacks,
|
||||
'server.socket_host' : listen_on,
|
||||
'server.socket_port' : opts.port,
|
||||
'server.socket_timeout' : opts.timeout, #seconds
|
||||
'server.thread_pool' : opts.thread_pool, # number of threads
|
||||
'server.shutdown_timeout': st, # minutes
|
||||
'server.socket_timeout' : opts.timeout, # seconds
|
||||
'server.thread_pool' : opts.thread_pool, # number of threads
|
||||
'server.shutdown_timeout': st, # minutes
|
||||
})
|
||||
if embedded or wsgi:
|
||||
cherrypy.config.update({'engine.SIGHUP' : None,
|
||||
@ -173,9 +171,9 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache,
|
||||
self.exception = None
|
||||
auth_controller = None
|
||||
self.users_dict = {}
|
||||
#self.config['/'] = {
|
||||
# self.config['/'] = {
|
||||
# 'tools.sessions.on' : True,
|
||||
# 'tools.sessions.timeout': 60, # Session times out after 60 minutes
|
||||
# 'tools.sessions.timeout': 60, # Session times out after 60 minutes
|
||||
#}
|
||||
|
||||
if not wsgi:
|
||||
|
Loading…
x
Reference in New Issue
Block a user