[fix] Do not modify handlers with root_handlers in bin/yunohost

This commit is contained in:
Jérôme Lebleu 2015-11-15 14:58:35 +01:00
parent 61267ccb1f
commit 3f42d12e95
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ def _init_moulinette(debug=False, verbose=False, quiet=False):
elif verbose and 'tty' not in handlers:
handlers.append('tty')
root_handlers = handlers
root_handlers = set(handlers)
if not debug:
root_handlers.remove('tty')

View file

@ -386,7 +386,7 @@ def hook_exec(path, args=None, raise_on_error=False, no_trace=False):
# Wrap and get process outputs
stdout_reader, stdout_queue = start_async_file_reading(process.stdout)
stderr_reader, stderr_queue = start_async_file_reading(process.stderr)
while not stdout_reader.eof() or not stderr_reader.eof():
while not stdout_reader.eof() and not stderr_reader.eof():
while not stdout_queue.empty():
line = stdout_queue.get()
logger.info(line.rstrip())