From 2349f35f3a91afb9e078b30f6e2ab0831f6804c5 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(-) (limited to 'QMTest') diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index 370101bb..b97f1032 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 v1.2.1 From edf7932e0693400c806e97b47f8cf4347d33a6bb Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 10 Mar 2017 17:00:31 -0500 Subject: remove debug logic --- QMTest/TestCmd.py | 1 - 1 file changed, 1 deletion(-) (limited to 'QMTest') diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index b97f1032..96e07a98 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -1355,7 +1355,6 @@ 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 v1.2.1