From 8b605aeaa8e7224682c7696867113d77e11ec9d4 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Fri, 11 Dec 2020 15:53:10 +0100 Subject: [PATCH] Only register gdrive callback if gdrive is enabled --- cps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps.py b/cps.py index 3601e4b6..20aa9cac 100755 --- a/cps.py +++ b/cps.py @@ -31,7 +31,7 @@ else: sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor')) -from cps import create_app +from cps import create_app, config from cps import web_server from cps.opds import opds from cps.web import web @@ -64,7 +64,8 @@ def main(): app.register_blueprint(about) app.register_blueprint(shelf) app.register_blueprint(admi) - app.register_blueprint(gdrive) + if config.config_use_google_drive: + app.register_blueprint(gdrive) app.register_blueprint(editbook) if kobo_available: app.register_blueprint(kobo)