Make test_socket pass. There was an unchecked error when a Unicode
hostname was passed.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 4e62316..71eafe6 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3854,7 +3854,8 @@
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 {