mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Replace os.error with OSError in tkinter and IDLE
This commit is contained in:
parent
69d03c4799
commit
786fbd8db7
6 changed files with 8 additions and 8 deletions
|
@ -166,7 +166,7 @@ class FileDialog:
|
|||
dir, pat = self.get_filter()
|
||||
try:
|
||||
names = os.listdir(dir)
|
||||
except os.error:
|
||||
except OSError:
|
||||
self.master.bell()
|
||||
return
|
||||
self.directory = dir
|
||||
|
@ -209,7 +209,7 @@ class FileDialog:
|
|||
if not os.path.isabs(dir):
|
||||
try:
|
||||
pwd = os.getcwd()
|
||||
except os.error:
|
||||
except OSError:
|
||||
pwd = None
|
||||
if pwd:
|
||||
dir = os.path.join(pwd, dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue