From 27a39c8465a49db5e65f83c36e531ea1f7769682 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 10 Apr 2024 11:01:02 +0300 Subject: linting: Fix linting errors. --- qc_app/errors.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'qc_app') diff --git a/qc_app/errors.py b/qc_app/errors.py index ff656b8..1ce0d1f 100644 --- a/qc_app/errors.py +++ b/qc_app/errors.py @@ -1,5 +1,4 @@ """Application error handling.""" -import logging import traceback from werkzeug.exceptions import HTTPException @@ -14,8 +13,8 @@ def handle_general_exception(exc: Exception): exc.__class__.__module__, exc.__class__.__name__, request.url, trace) return render_template("unhandled_exception.html", trace=trace) -def register_error_handlers(app: Flask): +def register_error_handlers(appl: Flask): """Register top-level error/exception handlers.""" - app.register_error_handler(Exception, handle_general_exception) - app.register_error_handler(HTTPException, handle_general_exception) - app.register_error_handler(mdb.MySQLError, handle_general_exception) + appl.register_error_handler(Exception, handle_general_exception) + appl.register_error_handler(HTTPException, handle_general_exception) + appl.register_error_handler(mdb.MySQLError, handle_general_exception) -- cgit v1.2.3