mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
String: fix it up to work with the previously committed enhancement for subprocess timeout.
Conflicts: plugins/String/plugin.py
This commit is contained in:
parent
3526d5dabf
commit
91ac1c2179
@ -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):
|
||||||
|
@ -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)'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user