summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 19:20:17 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-11 19:20:17 (GMT)
commit31e18291c59270a4c84360e7ba725b229a47c7e1 (patch)
tree325fd2d1a899e88f413edf0f2141b0ae016f4d55
parent652553192ef7377909bdf9cc479625f99e5b6e88 (diff)
downloadcpython-31e18291c59270a4c84360e7ba725b229a47c7e1.zip
cpython-31e18291c59270a4c84360e7ba725b229a47c7e1.tar.gz
cpython-31e18291c59270a4c84360e7ba725b229a47c7e1.tar.bz2
Clean up a bare except where we only expect to catch pcre.error.
-rw-r--r--Lib/pre.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pre.py b/Lib/pre.py
index 357e0a6..1665660 100644
--- a/Lib/pre.py
+++ b/Lib/pre.py
@@ -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: