diff --git a/Lib/idlelib/GrepDialog.py b/Lib/idlelib/GrepDialog.py index 01e0483d4b27..27fcc33c329e 100644 --- a/Lib/idlelib/GrepDialog.py +++ b/Lib/idlelib/GrepDialog.py @@ -81,7 +81,7 @@ def grep_it(self, prog, path): hits = 0 for fn in list: try: - f = open(fn) + f = open(fn, errors='replace') except IOError as msg: print(msg) continue diff --git a/Misc/NEWS b/Misc/NEWS index 3e4157ecfded..bd296cac7256 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -49,6 +49,9 @@ Core and Builtins Library ------- +- Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping. + Patch by Roger Serwy. + - Issue #12515: email now registers a defect if it gets to EOF while parsing a MIME part without seeing the closing MIME boundary.