]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve error handling when .idlerc can't be created. This is a partial
authorKurt B. Kaiser <kbk@shore.net>
Mon, 17 Jan 2005 20:06:47 +0000 (20:06 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Mon, 17 Jan 2005 20:06:47 +0000 (20:06 +0000)
backport of configHandler.py, Revision 1.36,  11Jan05.

Lib/idlelib/NEWS.txt
Lib/idlelib/configHandler.py

index eb74aa01b1025412f86e4925a7bf9f5e583b1657..9cbfa8e69398cafddf196c418b6594bab3b33e4e 100644 (file)
@@ -1,7 +1,10 @@
 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().
index 3d79fb9b3aceff25ed6aa1005791999e244c841e..dde7813793dc6257a87feb043e1a2ddb60a35c82 100644 (file)
@@ -209,10 +209,11 @@ class IdleConf:
         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):