diff options
author | Frederick Muriuki Muriithi | 2024-04-10 11:01:02 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-04-10 11:01:02 +0300 |
commit | 27a39c8465a49db5e65f83c36e531ea1f7769682 (patch) | |
tree | 2241a57ed5ce6e2b24ff4a62d427f3cfce45e721 /qc_app/errors.py | |
parent | acdbc30fd8d12d25f48a2ea839a6c2eb91527b95 (diff) | |
download | gn-uploader-27a39c8465a49db5e65f83c36e531ea1f7769682.tar.gz |
linting: Fix linting errors.
Diffstat (limited to 'qc_app/errors.py')
-rw-r--r-- | qc_app/errors.py | 9 |
1 files changed, 4 insertions, 5 deletions
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) |