]> granicus.if.org Git - python/commitdiff
Clean up a bare except where we only expect to catch pcre.error.
authorFred Drake <fdrake@acm.org>
Fri, 11 May 2001 19:20:17 +0000 (19:20 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 11 May 2001 19:20:17 +0000 (19:20 +0000)
Lib/pre.py

index 357e0a658c045431749810cfcd03f5cfe093b2f9..1665660bd8afb1d3df3e1a1fe50f28d625af44a3 100644 (file)
@@ -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: