From: Kurt B. Kaiser Date: Wed, 23 Jan 2008 22:19:23 +0000 (+0000) Subject: Could not open files in .idlerc directory if latter was hidden on Windows. X-Git-Tag: v2.6a1~447 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4aaa760533670b196059e6c85d0dd8626d53a51;p=python Could not open files in .idlerc directory if latter was hidden on Windows. Issue 1743, Issue 1862. --- diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index dc98e4e448..d931e98d3e 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -1,7 +1,10 @@ What's New in IDLE 2.6a1? ========================= -*Release date: XX-XXX-200X* +*Release date: XX-XXX-2008* + +- Could not open files in .idlerc directory if latter was hidden on Windows. + Issue 1743, Issue 1862. - Configure Dialog: improved layout for keybinding. Patch 1457 Tal Einat. diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 3318416e9f..08f0b3d333 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -139,7 +139,12 @@ class IdleUserConfParser(IdleConfParser): """ if not self.IsEmpty(): - cfgFile=open(self.file,'w') + fname = self.file + try: + cfgFile = open(fname, 'w') + except IOError: + fname.unlink() + cfgFile = open(fname, 'w') self.write(cfgFile) else: self.RemoveFile()