From: Kurt B. Kaiser Date: Mon, 17 Jan 2005 20:06:47 +0000 (+0000) Subject: Improve error handling when .idlerc can't be created. This is a partial X-Git-Tag: v2.3.5c1~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7af39c4ec92ccbcffba39a39f825fe7a970ffc3;p=thirdparty%2FPython%2Fcpython.git Improve error handling when .idlerc can't be created. This is a partial backport of configHandler.py, Revision 1.36, 11Jan05. --- diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index eb74aa01b102..9cbfa8e69398 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -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(). diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 3d79fb9b3ace..dde7813793dc 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -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):