From 3f42d12e958a132412ab2711fcc8a86264b074a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Sun, 15 Nov 2015 14:58:35 +0100 Subject: [PATCH] [fix] Do not modify handlers with root_handlers in bin/yunohost --- bin/yunohost | 2 +- src/yunohost/hook.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/yunohost b/bin/yunohost index c886c89bc..a5fadf574 100755 --- a/bin/yunohost +++ b/bin/yunohost @@ -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') diff --git a/src/yunohost/hook.py b/src/yunohost/hook.py index fd6179e81..44d6f12be 100644 --- a/src/yunohost/hook.py +++ b/src/yunohost/hook.py @@ -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())