Alan Robertson <al...@unix.sh> added the comment:

As far as I know, this only happens during shutdown. During shutdown it has 
already removed the attribute as part of the teardown process. In this case 
adding the attribute at the begining will do no good.

On Wed, Jan 6, 2021, at 10:30 AM, Vinay Sajip wrote:
> 
> Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:
> 
> TBH as I said in the now-closed PR, using a NullSocket seems overkill. 
> As mentioned in msg359594, it seems to make more sense to assign a 
> socket attribute to None early in the constructor. If an error occurs 
> during socket creation, the socket attribute will remain at None. When 
> closing, just ensure the socket attribute isn't None before trying to 
> close it. This mirrors what SocketHandler does.
> 
> ----------
> 
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue38780>
> _______________________________________
>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38780>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to