[issue21973] IDLE: catch user cfg file error, better error message, continue
Terry J. Reedy
report at bugs.python.org
Fri Nov 11 16:26:49 EST 2016
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 <report at bugs.python.org>
<http://bugs.python.org/issue21973>
_______________________________________
More information about the Python-bugs-list
mailing list