From 92a3552cde4abca1ebd1675b01376312290fdf4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 19 Aug 2015 11:58:47 +0200 Subject: Fix utils.callsubprocess stdin --- scripts/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utils.py b/scripts/utils.py index e06bdbb..af98fce 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -40,7 +40,10 @@ def callsubprocess(process_name, process, show_output = True, pass if stdin != None: - sprc.stdin.write(bytes(stdin, sys.getdefaultencoding())) + for ln in stdin: + sprc.stdin.write(bytes(ln + '\n', sys.getdefaultencoding())) + sprc.stdin.flush() + sprc.stdin.close() rtn = [] with open(os.path.join(sf(conf.log_folder), -- cgit v1.2.3