From 72c5c8ec09d92fe2270a1ee4edcb2f5a24dd0d1c Mon Sep 17 00:00:00 2001 From: Daniel Folkinshteyn Date: Fri, 12 Aug 2011 16:30:09 -0400 Subject: [PATCH] String: fix it up to work with the previously committed enhancement for subprocess timeout. Signed-off-by: James McCoy --- plugins/String/plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/String/plugin.py b/plugins/String/plugin.py index 0aa8bc338..ea734d9e7 100644 --- a/plugins/String/plugin.py +++ b/plugins/String/plugin.py @@ -142,8 +142,11 @@ class String(callbacks.Plugin): irc.error(s) else: t = self.registryValue('re.timeout') - v = commands.process(f, text, timeout=t, pn=self.name(), cn='re') - irc.reply(v) + try: + v = commands.process(f, text, timeout=t, pn=self.name(), cn='re') + irc.reply(v) + except commands.ProcessTimeoutError, e: + irc.error("ProcessTimeoutError: %s" % (e,)) re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'), 'text']))