From bcac0c74f3abfcad1e130f6691466e2940a0938c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 14 Jan 2017 14:52:02 -0500 Subject: [PATCH] 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 --- src/wormhole/codes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wormhole/codes.py b/src/wormhole/codes.py index dfa4625..708b289 100644 --- a/src/wormhole/codes.py +++ b/src/wormhole/codes.py @@ -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")