[Python-checkins] r60225 - python/trunk/Lib/idlelib/NEWS.txt python/trunk/Lib/idlelib/configHandler.py

kurt.kaiser python-checkins at python.org
Wed Jan 23 23:19:24 CET 2008


Author: kurt.kaiser
Date: Wed Jan 23 23:19:23 2008
New Revision: 60225
Modified:
 python/trunk/Lib/idlelib/NEWS.txt
 python/trunk/Lib/idlelib/configHandler.py
Log:
Could not open files in .idlerc directory if latter was hidden on Windows.
Issue 1743, Issue 1862.
Modified: python/trunk/Lib/idlelib/NEWS.txt
==============================================================================
--- python/trunk/Lib/idlelib/NEWS.txt	(original)
+++ python/trunk/Lib/idlelib/NEWS.txt	Wed Jan 23 23:19:23 2008
@@ -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.
 
Modified: python/trunk/Lib/idlelib/configHandler.py
==============================================================================
--- python/trunk/Lib/idlelib/configHandler.py	(original)
+++ python/trunk/Lib/idlelib/configHandler.py	Wed Jan 23 23:19:23 2008
@@ -139,7 +139,12 @@
 
 """
 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()


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /