mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
SF bug 924242: socket._fileobject._getclosed() returns wrong value
The .closed property always returned the wrong result. Bugfix candidate!
This commit is contained in:
parent
165163f245
commit
116d83ce71
2 changed files with 9 additions and 1 deletions
|
@ -217,7 +217,7 @@ class _fileobject(object):
|
|||
self._wbuf = [] # A list of strings
|
||||
|
||||
def _getclosed(self):
|
||||
return self._sock is not None
|
||||
return self._sock is None
|
||||
closed = property(_getclosed, doc="True if the file is closed")
|
||||
|
||||
def close(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue