summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py5
1 files changed, 3 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')