From 786fbd8db707c7cb302a1adf2b57a0b3f8ba078c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 17 Dec 2012 19:51:15 +0200 Subject: Replace os.error with OSError in tkinter and IDLE --- Lib/idlelib/TreeWidget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/idlelib/TreeWidget.py') diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py index d4e524bb65..833896cd00 100644 --- a/Lib/idlelib/TreeWidget.py +++ b/Lib/idlelib/TreeWidget.py @@ -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 = [] -- cgit v1.2.1