Update ssl.py

This commit is contained in:
César Hoyos 2020-01-09 11:04:01 +01:00 committed by GitHub
parent b45df84357
commit 815e878386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -894,10 +894,10 @@ class SSLObject:
The 'data' argument must support the buffer interface. The 'data' argument must support the buffer interface.
""" """
if data != b'': if data:
return self._sslobj.write(data) return self._sslobj.write(data)
else: else:
return "" return 0
def getpeercert(self, binary_form=False): def getpeercert(self, binary_form=False):
"""Returns a formatted version of the data in the certificate provided """Returns a formatted version of the data in the certificate provided