aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/pstats.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pstats.py')
-rw-r--r--Lib/pstats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 51bcca84188..2f054bb4011 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -329,7 +329,7 @@ class Stats:
if isinstance(sel, str):
try:
rex = re.compile(sel)
- except re.error:
+ except re.PatternError:
msg += " <Invalid regular expression %r>\n" % sel
return new_list, msg
new_list = []