diff options
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/replace.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/searchengine.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/replace.py b/Lib/idlelib/replace.py index a29ca59..7997f24 100644 --- a/Lib/idlelib/replace.py +++ b/Lib/idlelib/replace.py @@ -120,7 +120,7 @@ class ReplaceDialog(SearchDialogBase): if self.engine.isre(): try: new = m.expand(repl) - except re.error: + except re.PatternError: self.engine.report_error(repl, 'Invalid Replace Expression') new = None else: diff --git a/Lib/idlelib/searchengine.py b/Lib/idlelib/searchengine.py index 0684142..ceb38cf 100644 --- a/Lib/idlelib/searchengine.py +++ b/Lib/idlelib/searchengine.py @@ -84,7 +84,7 @@ class SearchEngine: flags = flags | re.IGNORECASE try: prog = re.compile(pat, flags) - except re.error as e: + except re.PatternError as e: self.report_error(pat, e.msg, e.pos) return None return prog |