String: fix it up to work with the previously committed enhancement for subprocess timeout.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
Daniel Folkinshteyn 2011-08-12 16:30:09 -04:00 committed by James McCoy
parent 6a9af819a3
commit 72c5c8ec09

View File

@ -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']))