Skip to content

Commit d9d3ebd

Browse files
Apply ruff/pyupgrade rule UP024
UP024 Replace aliased errors with `OSError`
1 parent 84aed85 commit d9d3ebd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test_dns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def test_getaddrinfo_close_loop(self):
244244
try:
245245
# Check that we have internet connection
246246
socket.getaddrinfo('example.com', 80)
247-
except socket.error:
247+
except OSError:
248248
raise unittest.SkipTest
249249

250250
async def run():

uvloop/_testbase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def find_free_port(start_from=50000):
260260
with sock:
261261
try:
262262
sock.bind(('', port))
263-
except socket.error:
263+
except OSError:
264264
continue
265265
else:
266266
return port

0 commit comments

Comments
 (0)