Added docomplete truth check on hy/completer.py:27

Without the check, the next line will reference readline even if the
library was not successfully loaded.
This commit is contained in:
Andrew Silva 2017-08-07 13:25:58 -04:00
parent bb00515ae7
commit c4f183f97c

View File

@ -24,10 +24,11 @@ except ImportError:
except ImportError:
docomplete = False
if sys.platform == 'darwin' and 'libedit' in readline.__doc__:
readline_bind = "bind ^I rl_complete"
else:
readline_bind = "tab: complete"
if docomplete:
if sys.platform == 'darwin' and 'libedit' in readline.__doc__:
readline_bind = "bind ^I rl_complete"
else:
readline_bind = "tab: complete"
class Completer(object):