Skip to content

Commit 319c2dc

Browse files
committed
Merge pull request #13 from phillipkent/fix_bug_windows_readline
fix bug in using readline in WindowsI found a bug with use of 'readline' for Python 2.7 on Windows 7. Cloudmonkey fails to run with this error: File c:\python27\lib\site-packages\cloudmonkey\cloudmonkey.py line 70 module> If libedit in readline.__doc__ TypeError: argument of type NoneType is not iterable It requires modification of cloudmonkey.py at line 70. The error and fix are the same as reported here: http://bugs.python.org/issue18852 https://hg.python.org/cpython/rev/3070fdd58645 Note: I haven't tested this for Cloudmonkey in other Windows versions, or other Python versions. * pr/13: fix bug in using readline in Windows Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 parents 38b68fb + 3d9d779 commit 319c2dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cloudmonkey/cloudmonkey.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
print("Module readline not found, autocompletions will fail", e)
6868
else:
6969
import rlcompleter
70-
if 'libedit' in readline.__doc__:
70+
readline_doc = getattr(readline, '__doc__', '')
71+
if readline_doc is not None and 'libedit' in readline_doc:
7172
readline.parse_and_bind("bind ^I rl_complete")
7273
readline.parse_and_bind("bind ^R em-inc-search-prev")
7374
normal_readline = False

0 commit comments

Comments
 (0)