Commits

Kurt B. Kaiser  committed 955da08

Improve error handling when .idlerc can't be created. This is a partial
backport of configHandler.py, Revision 1.36, 11Jan05.

  • Participants
  • Parent commits 2246ab9
  • Branches 2.3

Comments (0)

Files changed (2)

File Lib/idlelib/NEWS.txt

 What's New in IDLE 1.0.4?
 =========================
 
-*Release date: XX-Dec-2004*
+*Release date: XX-Jan-2005*
+
+- Improve error handling when .idlerc can't be created.  This is a partial
+  backport of configHandler.py, Revision 1.36,  11Jan05.
 
 - The GUI was hanging if the shell window was closed while a raw_input() 
   was pending.  Restored the quit() of the readline() mainloop().

File Lib/idlelib/configHandler.py

         if not os.path.exists(userDir):
             try: #make the config dir if it doesn't exist yet
                 os.mkdir(userDir)
-            except IOError:
+            except (OSError, IOError):
                 warn=('\n Warning: unable to create user config directory\n '+
                         userDir+'\n')
                 sys.stderr.write(warn)
+                raise SystemExit
         return userDir
 
     def GetOption(self, configType, section, option, default=None, type=None):