[Python-checkins] r60782 - python/branches/release25-maint/Lib/idlelib/NEWS.txt python/branches/release25-maint/Lib/idlelib/configHandler.py

kurt.kaiser python-checkins at python.org
Thu Feb 14 05:37:26 CET 2008


Author: kurt.kaiser
Date: Thu Feb 14 05:37:26 2008
New Revision: 60782

Modified:
   python/branches/release25-maint/Lib/idlelib/NEWS.txt
   python/branches/release25-maint/Lib/idlelib/configHandler.py
Log:
Could not open files in .idlerc directory if latter was hidden on Windows.
Issue 1743, Issue 1862.
Backport r60225, r60745


Modified: python/branches/release25-maint/Lib/idlelib/NEWS.txt
==============================================================================
--- python/branches/release25-maint/Lib/idlelib/NEWS.txt	(original)
+++ python/branches/release25-maint/Lib/idlelib/NEWS.txt	Thu Feb 14 05:37:26 2008
@@ -3,6 +3,9 @@
 
 *Release date: XX-FEB-2008*
 
+- Could not open files in .idlerc directory if latter was hidden on Windows.  
+  Issue 1743, Issue 1862. (backport r60225, r60745)
+
 - format_paragraph_event wasn't returning a 'break' (backport r59453)
 
 - Corrected some bugs in AutoComplete.  Also, Page Up/Down in ACW implemented;                                                                               

Modified: python/branches/release25-maint/Lib/idlelib/configHandler.py
==============================================================================
--- python/branches/release25-maint/Lib/idlelib/configHandler.py	(original)
+++ python/branches/release25-maint/Lib/idlelib/configHandler.py	Thu Feb 14 05:37:26 2008
@@ -142,7 +142,12 @@
 
         """
         if not self.IsEmpty():
-            cfgFile=open(self.file,'w')
+            fname = self.file
+            try:
+                cfgFile = open(fname, 'w')
+            except IOError:
+                os.unlink(fname)
+                cfgFile = open(fname, 'w')
             self.write(cfgFile)
         else:
             self.RemoveFile()


More information about the Python-checkins mailing list