Code cleanup and style improvements in team sync

This commit is contained in:
Joseph Schorr 2017-03-15 18:32:40 -04:00
parent 84e37b68ee
commit 7f0aa19292
3 changed files with 28 additions and 14 deletions

View file

@ -274,8 +274,7 @@ class LDAPUsers(FederatedUsers):
if err is not None:
return (False, err)
results = list(it)
if not results:
if not list(it):
return (False, 'Group does not exist or is empty')
return (True, None)
@ -340,6 +339,6 @@ class LDAPUsers(FederatedUsers):
# No additional results.
break
else:
# Pagintation is not supported.
# Pagination is not supported.
logger.debug('Pagination is not supported for this LDAP server')
break