py: raise a TimeoutError instead of using socket.timeout

Summary:
The latter is deprecated, and since this file doesn't import socket, this code
simply doesn't run.

Reviewed By: fanzeyi

Differential Revision: D34317839

fbshipit-source-id: 91baf5750153f7251385ec676edcd82dd5c331be
This commit is contained in:
Xavier Deguillard 2022-02-18 09:39:29 -08:00 committed by Facebook GitHub Bot
parent 48473ab389
commit 00a924a2b5

View File

@ -182,7 +182,7 @@ class WindowsSocketHandle(object):
"Windows UDS: Connection refused",
)
elif errcode == WSAETIMEDOUT:
raise socket.timeout()
raise TimeoutError(errno.ETIMEDOUT, "Windows UDS: Socket timeout")
elif errcode == WSAEWOULDBLOCK:
raise OSError(
errno.EWOULDBLOCK,