res = lc.search_s(BaseDn, ldap.SCOPE_ONELEVEL, "uid=" + uid, ['sudoPassword'])
if len(res) != 1:
raise UDFormatError("Not exactly one hit when searching for user")
res = lc.search_s(BaseDn, ldap.SCOPE_ONELEVEL, "uid=" + uid, ['sudoPassword'])
if len(res) != 1:
raise UDFormatError("Not exactly one hit when searching for user")