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

Conflicts:

	plugins/String/plugin.py
This commit is contained in:
Daniel Folkinshteyn 2011-08-12 16:30:09 -04:00 committed by Valentin Lorentz
parent 3526d5dabf
commit 91ac1c2179
2 changed files with 9 additions and 5 deletions

View File

@ -146,10 +146,14 @@ class String(callbacks.Plugin):
s = _('You probably don\'t want to match the empty string.') s = _('You probably don\'t want to match the empty string.')
irc.error(s) irc.error(s)
else: else:
irc.reply(f(text)) t = self.registryValue('re.timeout')
re = wrap(re, [('checkCapability', 'trusted'), try:
first('regexpMatcher', 'regexpReplacer'), v = commands.process(f, text, timeout=t, pn=self.name(), cn='re')
'text']) irc.reply(v)
except commands.ProcessTimeoutError, e:
irc.error("ProcessTimeoutError: %s" % (e,))
re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'),
'text']))
@internationalizeDocstring @internationalizeDocstring
def xor(self, irc, msg, args, password, text): def xor(self, irc, msg, args, password, text):

View File

@ -1,3 +1,3 @@
"""stick the various versioning attributes in here, so we only have to change """stick the various versioning attributes in here, so we only have to change
them once.""" them once."""
version = '0.83.4.1+limnoria (2011-08-13T01:53:58+0200)' version = '0.83.4.1+limnoria (2011-08-13T01:55:24+0200)'