diff options
author | rsiddharth <s@ricketyspace.net> | 2019-07-09 18:08:40 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-07-09 18:08:40 -0400 |
commit | 6dffeefb95e424a70b08aba2e1942b3be32febd6 (patch) | |
tree | 73494aa28d71af0d85522707db59a507b1546219 | |
parent | 6f4354e850a597c9ebfff3287706eca6fe18f402 (diff) |
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`.
-rw-r--r-- | revoke_crt.py | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |