From 598c5058f8b60951727368ebe5869f884a700ca7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 18 May 2017 15:31:24 +0530 Subject: [PATCH] ... --- src/calibre/srv/handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/srv/handler.py b/src/calibre/srv/handler.py index 946cdb29a3..60b33569c7 100644 --- a/src/calibre/srv/handler.py +++ b/src/calibre/srv/handler.py @@ -151,6 +151,9 @@ class Context(object): return old[1] +SRV_MODULES = ('ajax', 'books', 'cdb', 'code', 'content', 'legacy', 'opds') + + class Handler(object): def __init__(self, libraries, opts, testing=False, notify_changes=None): @@ -161,7 +164,7 @@ class Handler(object): prefer_basic_auth = {'auto':has_ssl, 'basic':True}.get(opts.auth_mode, False) self.auth_controller = AuthController(user_credentials=ctx.user_manager, prefer_basic_auth=prefer_basic_auth) self.router = Router(ctx=ctx, url_prefix=opts.url_prefix, auth_controller=self.auth_controller) - for module in ('content', 'ajax', 'code', 'legacy', 'opds', 'books', 'cdb'): + for module in SRV_MODULES: module = import_module('calibre.srv.' + module) self.router.load_routes(vars(module).itervalues()) self.router.finalize()