Skip to content

Commit c3c573a

Browse files
authored
Update error message in _overlapped.BindLocal()
Replace a confusing error message with one that actually explains what the error is in `_overlapped.BindLocal()`. Fixes: #144493
1 parent b6d8aa4 commit c3c573a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/overlapped.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ _overlapped_BindLocal_impl(PyObject *module, HANDLE Socket, int Family)
559559
ret = bind((SOCKET)Socket, (SOCKADDR*)&addr, sizeof(addr))
560560
!= SOCKET_ERROR;
561561
} else {
562-
PyErr_SetString(PyExc_ValueError, "expected tuple of length 2 or 4");
562+
PyErr_SetString(PyExc_ValueError, "Only AF_INET and AF_INET6 families are supported");
563563
return NULL;
564564
}
565565

0 commit comments

Comments
 (0)