File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -188,10 +188,9 @@ def _get_pem_key(credentials):
188188 'not a valid service account credentials type' ))
189189
190190 if crypto is None :
191- raise EnvironmentError ('pyOpenSSL must be installed to load a '
192- 'private key' )
193- else :
194- return crypto .load_privatekey (crypto .FILETYPE_PEM , pem_text )
191+ raise EnvironmentError (
192+ 'pyOpenSSL must be installed to load a private key' )
193+ return crypto .load_privatekey (crypto .FILETYPE_PEM , pem_text )
195194
196195
197196def _get_signature_bytes (credentials , string_to_sign ):
@@ -221,8 +220,7 @@ def _get_signature_bytes(credentials, string_to_sign):
221220 if crypto is None :
222221 raise EnvironmentError ('pyOpenSSL must be installed to sign '
223222 'content using a private key' )
224- else :
225- return crypto .sign (pkey , string_to_sign , 'SHA256' )
223+ return crypto .sign (pkey , string_to_sign , 'SHA256' )
226224
227225
228226def _get_service_account_name (credentials ):
You can’t perform that action at this time.
0 commit comments