From: Terry Jan Reedy Date: Mon, 28 May 2012 02:56:49 +0000 (-0400) Subject: Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping. X-Git-Tag: v3.3.0a4~36^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1c5087802428133e7b45228fa22be8d3f2d463c;p=thirdparty%2FPython%2Fcpython.git Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping. Patch by Roger Serwy. --- 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 @@ class GrepDialog(SearchDialogBase): 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 3ea0ae30dff6..2b457232f2e4 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -67,6 +67,9 @@ Core and Builtins Library ------- +- Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping. + Patch by Roger Serwy. + - Issue12510: Attempting to get invalid tooltip no longer closes Idle. Original patch by Roger Serwy.