mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
String: @re: catch “invalid group reference” exceptions. (Fixes second issue of GH-824.)
This commit is contained in:
parent
3cd9bb7896
commit
838c3e5a66
@ -28,6 +28,7 @@
|
|||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
###
|
###
|
||||||
|
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
import codecs
|
import codecs
|
||||||
@ -205,6 +206,8 @@ class String(callbacks.Plugin):
|
|||||||
irc.reply(v)
|
irc.reply(v)
|
||||||
except commands.ProcessTimeoutError as e:
|
except commands.ProcessTimeoutError as e:
|
||||||
irc.error("ProcessTimeoutError: %s" % (e,))
|
irc.error("ProcessTimeoutError: %s" % (e,))
|
||||||
|
except re.error as e:
|
||||||
|
irc.error(e.args[0])
|
||||||
re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'),
|
re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'),
|
||||||
'text']))
|
'text']))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user