From 3e0375812ab61b21aed6eeac6c405879dfba62d9 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. --- 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 4f3398824..96da6855f 100644 --- a/plugins/String/plugin.py +++ b/plugins/String/plugin.py @@ -139,8 +139,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']))