From 258b4a6767d23d288e228126fe925a69d542d03e Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Thu, 28 Apr 2022 21:43:26 +0200 Subject: [PATCH] Bugfix OAuth Login --- cps/main.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cps/main.py b/cps/main.py index 16d288ac..d3591c06 100644 --- a/cps/main.py +++ b/cps/main.py @@ -22,13 +22,6 @@ from . import create_app from .jinjia import jinjia from .remotelogin import remotelogin -try: - from oauth_bb import oauth - oauth_available = True -except ImportError: - oauth_available = False - - def main(): app = create_app() @@ -50,6 +43,12 @@ def main(): except (ImportError, AttributeError): # Catch also error for not installed flask-WTF (missing csrf decorator) kobo_available = False + try: + from .oauth_bb import oauth + oauth_available = True + except ImportError: + oauth_available = False + from . import web_server init_errorhandler()