diff --git a/Lib/ssl.py b/Lib/ssl.py index 54c6f9abdf0..3b0c82d1644 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -894,10 +894,10 @@ class SSLObject: The 'data' argument must support the buffer interface. """ - if data != b'': + if data: return self._sslobj.write(data) else: - return "" + return 0 def getpeercert(self, binary_form=False): """Returns a formatted version of the data in the certificate provided