From 815e87838656ad49456c9b540de337f3cbc72635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Hoyos?= Date: Thu, 9 Jan 2020 11:04:01 +0100 Subject: [PATCH] Update ssl.py --- Lib/ssl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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