[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,8 +168,9 @@ class Interface(BaseInterface):
m18n.set_locale(get_locale()) m18n.set_locale(get_locale())
# Connect signals to handlers # Connect signals to handlers
msignals.set_handler('authenticate', self._do_authenticate)
msignals.set_handler('display', self._do_display) msignals.set_handler('display', self._do_display)
if os.isatty(1):
msignals.set_handler('authenticate', self._do_authenticate)
msignals.set_handler('prompt', self._do_prompt) msignals.set_handler('prompt', self._do_prompt)
self.actionsmap = actionsmap self.actionsmap = actionsmap