From df5daf0f9f24dc49496a7bc6f1dc2bdf7f0024fc Mon Sep 17 00:00:00 2001 From: William Brown Date: Wed, 1 Jun 2016 13:21:19 +1000 Subject: [PATCH] Improve the error message to specifically refer to byte string for the benefit of python 3 --- Modules/LDAPObject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/LDAPObject.c b/Modules/LDAPObject.c index bf19219..1a46326 100644 --- a/Modules/LDAPObject.c +++ b/Modules/LDAPObject.c @@ -169,7 +169,7 @@ Tuple_to_LDAPMod( PyObject* tup, int no_op ) goto error; if (!PyBytes_Check(item)) { PyErr_SetObject( PyExc_TypeError, Py_BuildValue( "sO", - "expected a string in the list", item)); + "expected a byte string in the list", item)); Py_DECREF(item); goto error; }