mirror of
https://github.com/python/cpython.git
synced 2025-11-12 07:02:33 +00:00
Clean up a bare except where we only expect to catch pcre.error.
This commit is contained in:
parent
652553192e
commit
31e18291c5
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ class RegexObject:
|
||||||
# See if repl contains group references
|
# See if repl contains group references
|
||||||
try:
|
try:
|
||||||
repl = pcre_expand(_Dummy, repl)
|
repl = pcre_expand(_Dummy, repl)
|
||||||
except:
|
except error:
|
||||||
m = MatchObject(self, source, 0, end, [])
|
m = MatchObject(self, source, 0, end, [])
|
||||||
repl = lambda m, repl=repl, expand=pcre_expand: expand(m, repl)
|
repl = lambda m, repl=repl, expand=pcre_expand: expand(m, repl)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue