]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
Fix utils.callsubprocess stdin
authorKarel Kočí <cynerd@email.cz>
Wed, 19 Aug 2015 09:58:47 +0000 (11:58 +0200)
committerKarel Kočí <cynerd@email.cz>
Wed, 19 Aug 2015 09:58:47 +0000 (11:58 +0200)
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),