summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap/auth_cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/auth/ldap/auth_cache.py')
-rw-r--r--pykolab/auth/ldap/auth_cache.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pykolab/auth/ldap/auth_cache.py b/pykolab/auth/ldap/auth_cache.py
index af65e40..f32779c 100644
--- a/pykolab/auth/ldap/auth_cache.py
+++ b/pykolab/auth/ldap/auth_cache.py
@@ -111,10 +111,7 @@ def get_entry(key):
finally:
_entries = db.query(Entry).filter_by(key=key).all()
- if _entries:
- return None
-
- if len(_entries) > 1:
+ if len(_entries) != 1:
return None
log.debug("Entry found: %r" % (_entries[0].__dict__))