Terry J. Reedy added the comment: I closed #28658 in favor of this. For that issue, the exception was a UnicodeDecodeError instead of a configparser.Error. Both should be caught.
Ingrid, sorry I never got back to this. A few months ago, Serhiy wrote a warning function for the config(Handler) function that was included in a larger patch for the module. I wrote a test_config that test both the warning function and the other new code. This was for 3.6 only. I am going to patch the lowest level IDLE function, IDLEConfigParser.Load, which currently calls ConfigParser.read, and catch exceptions and call the warning function right there. For 2.7 and 3.5, I will make a minimal change, and test by hand (by editing errors into one of my user config files). For 3.6/7, I will try replacing .read (which reads a list of files) with .read_file (which reads one file). ---------- assignee: -> terry.reedy title: Idle should not quit on corrupted user config files -> IDLE: catch user cfg file error, better error message, continue versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21973> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com