mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +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
|
@ -382,7 +382,7 @@ class FileTreeItem(TreeItem):
|
|||
try:
|
||||
os.rename(self.path, newpath)
|
||||
self.path = newpath
|
||||
except os.error:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def GetIconName(self):
|
||||
|
@ -395,7 +395,7 @@ class FileTreeItem(TreeItem):
|
|||
def GetSubList(self):
|
||||
try:
|
||||
names = os.listdir(self.path)
|
||||
except os.error:
|
||||
except OSError:
|
||||
return []
|
||||
names.sort(key = os.path.normcase)
|
||||
sublist = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue