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

This commit is contained in:
Daniel Folkinshteyn 2011-08-12 16:30:09 -04:00
parent 2feaddba08
commit 3e0375812a
1 changed files with 5 additions and 2 deletions

View File

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