From 2ecaa61fa5694474e43987c39a25c2ab4ca348ad Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 13 Sep 2021 07:24:59 -0700 Subject: [PATCH] headless: Fix some Python warnings. Also, on newer pythons, this was crashing entirely. --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index b4595ede9d..cd51a83f81 100755 --- a/test.py +++ b/test.py @@ -43,7 +43,7 @@ class Command(object): def run(self, timeout): def target(): - self.process = subprocess.Popen(self.cmd, bufsize=1, stdin=subprocess.PIPE, stdout=sys.stdout, stderr=subprocess.STDOUT) + self.process = subprocess.Popen(self.cmd, stdin=subprocess.PIPE, stdout=sys.stdout, stderr=subprocess.STDOUT) self.process.stdin.write(self.data.encode('utf-8')) self.process.stdin.close() self.process.communicate() @@ -52,7 +52,7 @@ class Command(object): thread.start() thread.join(timeout) - if thread.isAlive(): + if thread.is_alive(): self.timeout = True if sys.version_info < (2, 6): os.kill(self.process.pid, signal.SIGKILL)