mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Make test_socket pass. There was an unchecked error when a Unicode
hostname was passed.
This commit is contained in:
parent
1ab8330827
commit
b5b2270afb
2 changed files with 24 additions and 24 deletions
|
@ -3854,7 +3854,8 @@ socket_getaddrinfo(PyObject *self, PyObject *args)
|
|||
idna = PyObject_CallMethod(hobj, "encode", "s", "idna");
|
||||
if (!idna)
|
||||
return NULL;
|
||||
hptr = PyString_AsString(idna);
|
||||
assert(PyBytes_Check(idna));
|
||||
hptr = PyBytes_AsString(idna);
|
||||
} else if (PyString_Check(hobj)) {
|
||||
hptr = PyString_AsString(hobj);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue