Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1c5087

Browse files
committed
Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
Patch by Roger Serwy.
1 parent c5301ef commit e1c5087

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/idlelib/GrepDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def grep_it(self, prog, path):
8181
hits = 0
8282
for fn in list:
8383
try:
84-
f = open(fn)
84+
f = open(fn, errors='replace')
8585
except IOError as msg:
8686
print(msg)
8787
continue

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ Core and Builtins
6767
Library
6868
-------
6969

70+
- Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
71+
Patch by Roger Serwy.
72+
7073
- Issue12510: Attempting to get invalid tooltip no longer closes Idle.
7174
Original patch by Roger Serwy.
7275

0 commit comments

Comments
 (0)