From 0def217fba5098990c4e9d778c9ad072318ec743 Mon Sep 17 00:00:00 2001 From: stroeder Date: Sun, 17 Jul 2016 14:49:22 +0000 Subject: [PATCH] SimpleLDAPObject.unbind_ext_s(): simplified and flush trace file --- Lib/ldap/ldapobject.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Lib/ldap/ldapobject.py b/Lib/ldap/ldapobject.py index 9e9c217..94b7a90 100644 --- a/Lib/ldap/ldapobject.py +++ b/Lib/ldap/ldapobject.py @@ -3,7 +3,7 @@ See http://www.python-ldap.org/ for details. -\$Id: ldapobject.py,v 1.154 2016/03/11 12:46:09 stroeder Exp $ +\$Id: ldapobject.py,v 1.155 2016/07/17 14:49:22 stroeder Exp $ Compability: - Tested with Python 2.0+ but should work with Python 1.5.x @@ -633,8 +633,11 @@ def unbind_ext(self,serverctrls=None,clientctrls=None): def unbind_ext_s(self,serverctrls=None,clientctrls=None): msgid = self.unbind_ext(serverctrls,clientctrls) if msgid!=None: - resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout) - return resp_type, resp_data, resp_msgid, resp_ctrls + result = self.result3(msgid,all=1,timeout=self.timeout) + else: + result = None + self._trace_file.flush() + return result def unbind(self): return self.unbind_ext(None,None)