]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blobdiff - scripts/utils.py
Fix utils.callsubprocess stdin
[linux-conf-perf.git] / scripts / utils.py
index e06bdbb6b05c173bbd4245efb7d07eaf1d5dcf28..af98fcedb3b6804c87e327dcd1d94c692f503d61 100644 (file)
@@ -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),