bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)

Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
Christian Heimes 2020-11-20 09:26:07 +01:00 committed by GitHub
parent 7ddbaa7a1b
commit 03c8ddd9e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 72 additions and 62 deletions

View file

@ -277,7 +277,7 @@ class OtherNetworkTests(unittest.TestCase):
ioerror_peer_reset:
buf = f.read()
debug("read %d bytes" % len(buf))
except socket.timeout:
except TimeoutError:
print("<timeout: %s>" % url, file=sys.stderr)
f.close()
time.sleep(0.1)