Could not open files in .idlerc directory if latter was hidden on Windows.

Issue 1743, Issue 1862.
This commit is contained in:
Kurt B. Kaiser 2008-01-23 22:19:23 +00:00
parent 1d9a9eaa89
commit b4aaa76053
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,10 @@
What's New in IDLE 2.6a1? 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. - Configure Dialog: improved layout for keybinding. Patch 1457 Tal Einat.

View File

@ -139,7 +139,12 @@ class IdleUserConfParser(IdleConfParser):
""" """
if not self.IsEmpty(): 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) self.write(cfgFile)
else: else:
self.RemoveFile() self.RemoveFile()