[Python-checkins] cpython (2.7): initialize _makefile_refs earlier so things don't blow up when close() is

benjamin.peterson python-checkins at python.org
Sun Nov 23 18:46:28 CET 2014


https://hg.python.org/cpython/rev/588ebc8fd3da
changeset:   93550:588ebc8fd3da
branch:      2.7
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Nov 23 11:16:48 2014 -0600
summary:
  initialize _makefile_refs earlier so things don't blow up when close() is called in the constructor

files:
  Lib/ssl.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/ssl.py b/Lib/ssl.py
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -483,6 +483,7 @@
                  server_hostname=None,
                  _context=None):
 
+        self._makefile_refs = 0
         if _context:
             self._context = _context
         else:
@@ -565,7 +566,6 @@
             except (OSError, ValueError):
                 self.close()
                 raise
-        self._makefile_refs = 0
 
     @property
     def context(self):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list