From 2d84a8340084ca4b2993d0c6d2714396834748be Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Tue, 12 Nov 2013 16:55:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20?= =?UTF-8?q?=D1=81=20LDAP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calculate/lib/cl_ldap.py | 1 + calculate/lib/utils/common.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/calculate/lib/cl_ldap.py b/calculate/lib/cl_ldap.py index b4ee12c..802ded4 100644 --- a/calculate/lib/cl_ldap.py +++ b/calculate/lib/cl_ldap.py @@ -251,6 +251,7 @@ class ldapUser(_error): if not self.ldapObj: ldapObj = ldapFun(bindDn, bindPw, host) if ldapObj.getError(): + ldapObj.clearErrors() return False # Устанавливаем у объекта соединение и объект LDAP функций self.ldapObj = ldapObj diff --git a/calculate/lib/utils/common.py b/calculate/lib/utils/common.py index a334435..9f13c66 100644 --- a/calculate/lib/utils/common.py +++ b/calculate/lib/utils/common.py @@ -51,7 +51,7 @@ class _error: return True def clearErrors(self): - for i in range(len(self.error)): + while(self.error): self.error.pop() class _warning: