[fix] Prevent freeze in the cli if it's not running from a tty

This commit is contained in:
Jérôme Lebleu 2014-05-17 22:03:52 +02:00
parent a205c04876
commit f2fed4a8b5

View file

@ -168,9 +168,10 @@ class Interface(BaseInterface):
m18n.set_locale(get_locale())
# Connect signals to handlers
msignals.set_handler('authenticate', self._do_authenticate)
msignals.set_handler('display', self._do_display)
msignals.set_handler('prompt', self._do_prompt)
if os.isatty(1):
msignals.set_handler('authenticate', self._do_authenticate)
msignals.set_handler('prompt', self._do_prompt)
self.actionsmap = actionsmap