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

(cherry picked from commit f2bce51b98)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: codenamenam <bluetire27@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-11-14 17:27:33 +01:00 committed by GitHub
parent 2f23c88243
commit 959578e5d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 70 additions and 19 deletions

View file

@ -589,6 +589,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):