diff options
author | 2018-03-29 16:28:05 +0100 | |
---|---|---|
committer | 2018-03-29 16:28:05 +0100 | |
commit | 9e394a8ad3a76c81232812070b9a60f25e6b857a (patch) | |
tree | a7528a6c37d514d8c87ffbd7dcf84583142fafed /pysite/route_manager.py | |
parent | Fix static files for staff subdomain (diff) |
Fix error handler management
Diffstat (limited to 'pysite/route_manager.py')
-rw-r--r-- | pysite/route_manager.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pysite/route_manager.py b/pysite/route_manager.py index 24d09ee2..949d4ed9 100644 --- a/pysite/route_manager.py +++ b/pysite/route_manager.py @@ -66,8 +66,12 @@ class RouteManager: for sub in self.subdomains: sub_blueprint = Blueprint(sub, __name__, subdomain=sub) self.log.debug(f"Loading Blueprint: {sub_blueprint.name}") - self.load_views(sub_blueprint, f"pysite/views/{sub}") - self.app.register_blueprint(sub_blueprint) + try: + self.app.register_blueprint(sub_blueprint) + except Exception: + logging.getLogger(__name__).exception(f"Failed to register blueprint for subdomain: {sub}") + else: + self.load_views(sub_blueprint, f"pysite/views/{sub}") # Load the websockets self.ws_blueprint = Blueprint("ws", __name__) |