diff --git a/horizon/exceptions.py b/horizon/exceptions.py index de9b278e37..5c545273de 100644 --- a/horizon/exceptions.py +++ b/horizon/exceptions.py @@ -20,7 +20,6 @@ import logging import os import sys -from debtcollector import removals from django.core.management import color_style from django.utils import encoding from django.utils.translation import gettext_lazy as _ @@ -192,22 +191,6 @@ def error_color(msg): return color_style().ERROR_OUTPUT(msg) -@removals.remove(message='Use exceptions.handle() instead', version='17.2.0') -def check_message(keywords, message): - """Checks an exception for given keywords and raises an error if found. - - It raises a new ``ActionError`` with the desired message if the - keywords are found. This allows selective - control over API error messages. - """ - exc_type, exc_value, exc_traceback = sys.exc_info() - if set(str(exc_value).split(" ")).issuperset(set(keywords)): - exc_value.message = message - # NOTE: This function is intended to call inside an except clause. - # pylint: disable=misplaced-bare-raise - raise - - def handle_unauthorized(request, message, redirect, ignore, escalate, handled, force_silence, force_log, log_method, log_entry, log_level): diff --git a/requirements.txt b/requirements.txt index 9eed09a458..cae4b8d711 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,6 @@ pbr>=5.5.0 # Apache-2.0 # Horizon Core Requirements Babel>=2.6.0 # BSD -debtcollector>=1.2.0 # Apache-2.0 Django>=4.2,<4.3 # BSD django-compressor>=2.4.1 # MIT django-debreach>=1.4.2 # BSD License (2 clause)