Skip to content

Commit c091f7f

Browse files
committed
Allow passing None as uri argument to ldap.initialize()
OpenLDAP allows passing NULL to ldap_initialize(). In this case the default URI from ldap.conf will be used. Allow passing None as uri argument to ldap.initialize().
1 parent e75c24d commit c091f7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ l_ldap_initialize(PyObject *unused, PyObject *args)
1717
int ret;
1818
PyThreadState *save;
1919

20-
if (!PyArg_ParseTuple(args, "s:initialize", &uri))
20+
if (!PyArg_ParseTuple(args, "z:initialize", &uri))
2121
return NULL;
2222

2323
save = PyEval_SaveThread();

0 commit comments

Comments
 (0)