From 838c3e5a6698d49f44a9604ceb723a7f9328e044 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 25 Aug 2014 09:43:02 +0000 Subject: [PATCH] =?UTF-8?q?String:=20@re:=20catch=20=E2=80=9Cinvalid=20gro?= =?UTF-8?q?up=20reference=E2=80=9D=20exceptions.=20(Fixes=20second=20issue?= =?UTF-8?q?=20of=20GH-824.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/String/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/String/plugin.py b/plugins/String/plugin.py index a22a1b5cb..580246bcc 100644 --- a/plugins/String/plugin.py +++ b/plugins/String/plugin.py @@ -28,6 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. ### +import re import sys import types import codecs @@ -205,6 +206,8 @@ class String(callbacks.Plugin): irc.reply(v) except commands.ProcessTimeoutError as e: irc.error("ProcessTimeoutError: %s" % (e,)) + except re.error as e: + irc.error(e.args[0]) re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'), 'text']))