diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-06 17:07:17 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-06 17:07:17 (GMT) |
commit | d8a1447c9980be5f1d8ae806f7aecd814b1cd6f6 (patch) | |
tree | a1966e33692ba9de3966c9760957233f51142cb2 /Modules/socketmodule.c | |
parent | 4a4b67951570a8a0452c77a5ebaa98b9ef9fb712 (diff) | |
download | cpython-d8a1447c9980be5f1d8ae806f7aecd814b1cd6f6.zip cpython-d8a1447c9980be5f1d8ae806f7aecd814b1cd6f6.tar.gz cpython-d8a1447c9980be5f1d8ae806f7aecd814b1cd6f6.tar.bz2 |
Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index db69d6e..7738c30 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1273,7 +1273,7 @@ idna_converter(PyObject *obj, struct maybe_idna *data) } if (strlen(data->buf) != len) { Py_CLEAR(data->obj); - PyErr_SetString(PyExc_TypeError, "host name must not contain NUL character"); + PyErr_SetString(PyExc_TypeError, "host name must not contain null character"); return 0; } return Py_CLEANUP_SUPPORTED; |