This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erlendaasland
Recipients alanr, erlendaasland, jaraco, ned.deily, ronaldoussoren, vinay.sajip
Date 2020-02-28.22:00:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582927250.27.0.693216141205.issue38780@roundup.psfhosted.org>
In-reply-to
Content
Attached patch is based on Ronald Oussoren's and Alan Robertson's comments: Initialise self.socket to None early in __init()__, and then check for None in close() and emit(). Passes make test on 3.9, 3.8 and 3.7.

If this solution is ok I'll add a unit test for the case that triggered this report and prepare a PR.
History
Date User Action Args
2020-02-28 22:00:50erlendaaslandsetrecipients: + erlendaasland, vinay.sajip, ronaldoussoren, jaraco, ned.deily, alanr
2020-02-28 22:00:50erlendaaslandsetmessageid: <1582927250.27.0.693216141205.issue38780@roundup.psfhosted.org>
2020-02-28 22:00:50erlendaaslandlinkissue38780 messages
2020-02-28 22:00:50erlendaaslandcreate