From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Make the error, not only the output, of run_command execution be logged when
using the tee argument.
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
src/wok/utils.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/wok/utils.py b/src/wok/utils.py
index b37518f..0ee4964 100644
--- a/src/wok/utils.py
+++ b/src/wok/utils.py
@@ -280,6 +280,8 @@ def run_command(cmd, timeout=None, silent=False, tee=None,
else:
wok_log.error(msg)
+ if tee is not None:
+ tee_log(msg, tee)
elif error:
wok_log.debug("error: %s returned from cmd: %s",
error, ' '.join(cmd))
--
2.5.5