@@ -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 ().replace ( b "\r " , b "" )
140+ back = proc .stdout .read ().strip ().decode ( errors = " replace" ). replace ( "\r " , "" )
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 . decode () )
147+ self .log .debug ("Result: %s" % back )
148148
149149 # Generate certificate key and signing request
150150 cmd_params = helper .shellquote (
@@ -160,7 +160,7 @@ def createSslRsaCert(self):
160160 cmd , shell = True , stderr = subprocess .STDOUT ,
161161 stdout = subprocess .PIPE , env = self .openssl_env
162162 )
163- back = proc .stdout .read ().strip ().decode ().replace ("\r " , "" )
163+ back = proc .stdout .read ().strip ().decode (errors = "replace" ).replace ("\r " , "" )
164164 proc .wait ()
165165 self .log .debug ("Running: %s\n %s" % (cmd , back ))
166166
@@ -179,7 +179,7 @@ def createSslRsaCert(self):
179179 cmd , shell = True , stderr = subprocess .STDOUT ,
180180 stdout = subprocess .PIPE , env = self .openssl_env
181181 )
182- back = proc .stdout .read ().strip ().decode ().replace ("\r " , "" )
182+ back = proc .stdout .read ().strip ().decode (errors = "replace" ).replace ("\r " , "" )
183183 proc .wait ()
184184 self .log .debug ("Running: %s\n %s" % (cmd , back ))
185185
0 commit comments