Commits

Armin Rigo  committed 1974924

issue1487: workaround

  • Participants
  • Parent commits 4aa84f3
  • Branches release-2.0.x

Comments (0)

Files changed (1)

File lib-python/2.7/socket.py

                 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):