Skip to content

Commit 500c96a

Browse files
Fix UnicodeDecodeError when OpenSSL is not found
Fixes #2180
1 parent 149c4f5 commit 500c96a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Crypt/CryptConnection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ def createSslRsaCert(self):
137137
cmd, shell=True, stderr=subprocess.STDOUT,
138138
stdout=subprocess.PIPE, env=self.openssl_env
139139
)
140-
back = proc.stdout.read().strip().decode().replace("\r", "")
140+
back = proc.stdout.read().strip().replace(b"\r", b"")
141141
proc.wait()
142142

143143
if not (os.path.isfile(self.cacert_pem) and os.path.isfile(self.cakey_pem)):
144144
self.log.error("RSA ECC SSL CAcert generation failed, CAcert or CAkey files not exist. (%s)" % back)
145145
return False
146146
else:
147-
self.log.debug("Result: %s" % back)
147+
self.log.debug("Result: %s" % back.decode())
148148

149149
# Generate certificate key and signing request
150150
cmd_params = helper.shellquote(

0 commit comments

Comments
 (0)