mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch
changing IOError to OSError (#16715).
This commit is contained in:
parent
50793b4438
commit
ba6c0d3b08
8 changed files with 18 additions and 22 deletions
|
@ -66,7 +66,7 @@ def view_file(parent, title, filename, encoding=None, modal=True):
|
|||
try:
|
||||
with open(filename, 'r', encoding=encoding) as file:
|
||||
contents = file.read()
|
||||
except IOError:
|
||||
except OSError:
|
||||
import tkinter.messagebox as tkMessageBox
|
||||
tkMessageBox.showerror(title='File Load Error',
|
||||
message='Unable to load file %r .' % filename,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue