Patchwork [4,of,5] mail: drop python 2.5 self.sock.read workaround

login
register
mail settings
Submitter timeless@mozdev.org
Date Oct. 20, 2015, 12:33 a.m.
Message ID <17ed74e8d8ef62ee19bb.1445301196@waste.org>
Download mbox | patch
Permalink /patch/11199/
State Superseded
Headers show

Comments

timeless@mozdev.org - Oct. 20, 2015, 12:33 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1444944282 14400
#      Thu Oct 15 17:24:42 2015 -0400
# Node ID 17ed74e8d8ef62ee19bb289b3dc2f0dbb5e321d7
# Parent  fc33b48966cfa28f7abc415cf6ba98a37bbf4e52
mail: drop python 2.5 self.sock.read workaround

Patch

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -60,9 +60,6 @@ 
         if resp == 220:
             self.sock = sslutil.wrapsocket(self.sock, keyfile, certfile,
                                            **self._sslkwargs)
-            if not util.safehasattr(self.sock, "read"):
-                # using httplib.FakeSocket with Python 2.5.x or earlier
-                self.sock.read = self.sock.recv
             self.file = smtplib.SSLFakeFile(self.sock)
             self.helo_resp = None
             self.ehlo_resp = None