Author: Armin Rigo <[email protected]>
Branch: release-2.0.x
Changeset: r64212:19749249231c
Date: 2013-05-16 09:30 +0200
http://bitbucket.org/pypy/pypy/changeset/19749249231c/
Log: issue1487: workaround
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
@@ -324,7 +324,12 @@
if self._close:
self._sock.close()
else:
- self._sock._decref_socketios()
+ try:
+ self._sock._decref_socketios()
+ except AttributeError:
+ pass # bah, someone built a _fileobject manually
+ # with some unexpected replacement of the
+ # _socketobject class
self._sock = None
def __del__(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit