Commit 31e18291 authored by Fred Drake's avatar Fred Drake

Clean up a bare except where we only expect to catch pcre.error.

parent 65255319
......@@ -364,7 +364,7 @@ class RegexObject:
# See if repl contains group references
try:
repl = pcre_expand(_Dummy, repl)
except:
except error:
m = MatchObject(self, source, 0, end, [])
repl = lambda m, repl=repl, expand=pcre_expand: expand(m, repl)
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment