backport of configHandler.py, Revision 1.36, 11Jan05.
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().
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):