From 6dffeefb95e424a70b08aba2e1942b3be32febd6 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 9 Jul 2019 18:08:40 -0400 Subject: revoke_crt.py: Update subprocess.Popen call. Set `universal_newlines` argument to True for the `subprocess.Popen` that reads the public key so that the `out` returned from proc.communicate is of type `str`. --- revoke_crt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revoke_crt.py b/revoke_crt.py index 2f37524..9897021 100644 --- a/revoke_crt.py +++ b/revoke_crt.py @@ -28,7 +28,7 @@ def revoke_crt(pubkey, crt): # Step 1: Get account public key sys.stderr.write("Reading pubkey file...\n") proc = subprocess.Popen(["openssl", "rsa", "-pubin", "-in", pubkey, "-noout", "-text"], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout=subprocess.PIPE, universal_newlines=True) out, err = proc.communicate() if proc.returncode != 0: raise IOError("Error loading {0}".format(pubkey)) -- cgit v1.2.3