From d52e2aa829c066731400836857f6c44af0e40399 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 12 Oct 2020 19:50:53 -0700 Subject: [PATCH] SedRegex: rename SearchNotFound -> SearchNotFoundError --- plugins/SedRegex/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/SedRegex/plugin.py b/plugins/SedRegex/plugin.py index ef1a85e12..1e71e0719 100644 --- a/plugins/SedRegex/plugin.py +++ b/plugins/SedRegex/plugin.py @@ -57,7 +57,7 @@ from .constants import SED_REGEX, TAG_SEEN, TAG_IS_REGEX # Replace newlines and friends with things like literal "\n" (backslash and "n") axe_spaces = utils.str.MultipleReplacer({'\n': '\\n', '\t': '\\t', '\r': '\\r'}) -class SearchNotFound(Exception): +class SearchNotFoundError(Exception): pass class SedRegex(callbacks.PluginRegexp): @@ -158,7 +158,7 @@ class SedRegex(callbacks.PluginRegexp): timeout=regex_timeout, pn=self.name(), cn='replacer') except ProcessTimeoutError: irc.error(_("Search timed out.")) - except SearchNotFound: + except SearchNotFoundError: irc.error(_("Search not found in the last %i IRC messages on this network.") % len(irc.state.history)) except Exception as e: @@ -223,7 +223,7 @@ class SedRegex(callbacks.PluginRegexp): self.log.debug(_("SedRegex: Search %r not found in the last %i messages of %s."), msg.args[1], len(irc.state.history), msg.args[0]) - raise SearchNotFound() + raise SearchNotFoundError() Class = SedRegex