From 44f20c13b64b2064d76aebaf7c367a18482d4b04 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Thu, 2 Mar 2017 16:48:15 -0800 Subject: fix byte/str py2/3 --- QMTest/TestCmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index 370101b..b97f103 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -783,7 +783,7 @@ class Popen(subprocess.Popen): return 0 try: - written = os.write(self.stdin.fileno(), input) + written = os.write(self.stdin.fileno(), bytearray(input,'utf-8')) except OSError as why: if why.args[0] == errno.EPIPE: #broken pipe return self._close('stdin') @@ -1355,6 +1355,7 @@ class TestCmd(object): if timeout: self.timer = threading.Timer(float(timeout), self._timeout) self.timer.start() + print("CMD:%s"%cmd) p = Popen(cmd, stdin=stdin, stdout=subprocess.PIPE, -- cgit v0.12