From d258a2ae0dfe823faf4b20adb8e819cb6e9fddd4 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 8 Dec 2021 12:12:39 -0500 Subject: [PATCH] Fix py2 compatibility of util --- confluent_server/confluent/util.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/confluent_server/confluent/util.py b/confluent_server/confluent/util.py index 0a30255c..d5ed798b 100644 --- a/confluent_server/confluent/util.py +++ b/confluent_server/confluent/util.py @@ -30,11 +30,11 @@ import eventlet.green.subprocess as subprocess def run(cmd): - with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as process: - stdout, stderr = process.communicate() - retcode = process.poll() - if retcode: - raise subprocess.CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) + process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = process.communicate() + retcode = process.poll() + if retcode: + raise subprocess.CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) return stdout, stderr