codes: don't assume 'readline' has a __doc__

This fixes cygwin, which (for some reason) doesn't include docstrings in the
readline module.

closes #111
This commit is contained in:
Brian Warner 2017-01-14 14:52:02 -05:00
parent d1c3c621e8
commit bcac0c74f3

View File

@ -94,7 +94,7 @@ def input_code_with_completion(prompt, initial_channelids, get_channel_ids,
import readline
c = CodeInputter(initial_channelids, get_channel_ids, code_length,
used_completion_f)
if "libedit" in readline.__doc__:
if readline.__doc__ and "libedit" in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")