gh-140691: urllib.request: Close FTP control socket if data socket can't connect (GH-140835)

Co-authored-by: codenamenam <bluetire27@gmail.com>
This commit is contained in:
Petr Viktorin 2025-11-05 11:52:11 +01:00 committed by GitHub
parent 335d83ec04
commit f2bce51b98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 70 additions and 19 deletions

View file

@ -646,6 +646,9 @@ def __str__(self):
"line : %r}" % (self.message, self._category_name,
self.filename, self.lineno, self.line))
def __repr__(self):
return f'<{type(self).__qualname__} {self}>'
class catch_warnings(object):