diff options
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index 6af1964..2dc9736 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -108,7 +108,7 @@ class socket(_socket.socket): if s.startswith("<socket object"): s = "<%s.%s%s%s" % (self.__class__.__module__, self.__class__.__name__, - (self._closed and " [closed] ") or "", + getattr(self, '_closed', False) and " [closed] " or "", s[7:]) return s |