Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r65965:105d5feef576 Date: 2013-08-06 12:49 +0200 http://bitbucket.org/pypy/pypy/changeset/105d5feef576/
Log: fixes diff --git a/lib-python/2.7/socket.py b/lib-python/2.7/socket.py --- a/lib-python/2.7/socket.py +++ b/lib-python/2.7/socket.py @@ -165,6 +165,8 @@ # All _delegate_methods must also be initialized here. send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy __getattr__ = _dummy + def _drop(self): + pass # Wrapper around platform socket objects. This implements # a platform-independent dup() functionality. The @@ -331,10 +333,11 @@ self.flush() finally: s = self._sock - if self._close: - self._sock.close() self._sock = None - s._drop() + if s is not None: + s._drop() + if self._close: + s.close() def __del__(self): try: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit