From 0e66fae6ac8c8f5fa7ddffa2a8a6e384fe20bc4b Mon Sep 17 00:00:00 2001 From: Daniel Hoffend Date: Mon, 13 Jan 2020 14:08:31 +0100 Subject: encode_page_control() must have a 2nd argument T5734 Summary: As reported in T5734 kolab sync and kolabd are crashing with a trackback that encode_page_control must have 2 arguments. Adding the empty cookie attribute to the server_page_controls removed the error. Reviewers: #pykolab_developers, vanmeeuwen Reviewed By: #pykolab_developers, vanmeeuwen Differential Revision: https://git.kolab.org/D895 --- pykolab/auth/ldap/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pykolab/auth') diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py index 44019aa..67e9487 100644 --- a/pykolab/auth/ldap/__init__.py +++ b/pykolab/auth/ldap/__init__.py @@ -2896,7 +2896,7 @@ class LDAP(Base): page_size = 500 _results = [] - server_page_control = ldap.controls.libldap.SimplePagedResultsControl(size=page_size) + server_page_control = ldap.controls.libldap.SimplePagedResultsControl(size=page_size,cookie='') _search = self.ldap.search_ext( base_dn, @@ -2937,7 +2937,7 @@ class LDAP(Base): pctrls = [ c for c in _result_controls - if c.controlType == LDAP_CONTROL_PAGED_RESULTS + if c.controlType == ldap.controls.libldap.SimplePagedResultsControl.controlType ] if pctrls: -- cgit v1.1