diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-09-06 17:08:08 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-09-06 17:08:08 (GMT) |
commit | 4a0430166bdf9afd04b9e6bd00f43080bc57d00b (patch) | |
tree | ca4707e34cf80e756292423793dfdbd40284568f | |
parent | f203f2d51da404fd59cbfbf40201fe30bd9ea79c (diff) | |
download | cpython-4a0430166bdf9afd04b9e6bd00f43080bc57d00b.zip cpython-4a0430166bdf9afd04b9e6bd00f43080bc57d00b.tar.gz cpython-4a0430166bdf9afd04b9e6bd00f43080bc57d00b.tar.bz2 |
#18852: Handle readline.__doc__ being None in site.py readline activation.
Patch by Berker Peksag.
-rw-r--r-- | Lib/site.py | 5 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index 77d198a..c4ea6f6 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -388,8 +388,9 @@ def enablerlcompleter(): return # Reading the initialization (config) file may not be enough to set a - # completion key, so we set one first and then read the file - if 'libedit' in getattr(readline, '__doc__', ''): + # completion key, so we set one first and then read the file. + readline_doc = getattr(readline, '__doc__', '') + if readline_doc is not None and 'libedit' in readline_doc: readline.parse_and_bind('bind ^I rl_complete') else: readline.parse_and_bind('tab: complete') @@ -56,6 +56,9 @@ Core and Builtins Library ------- +- Issue #18852: Handle case of ``readline.__doc__`` being ``None`` in the new + readline activation code in ``site.py``. + - Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in the _sre moduel. |