[python-ldap] ldap.SUCCESS sometimes, the results other times

Russell Jackson raj at csub.edu
Tue Jul 12 21:49:50 CEST 2011


On 07/08/2011 06:03 AM, Jeff Blaine wrote:
> On 7/8/2011 3:07 AM, Michael Ströder wrote:
>> Jeff Blaine wrote:
>>> I'm clearly doing something wrong :)
>>>
>>> I don't see this addressed in the documentation or the
>>> FAQ.
>>>
>>> I'm developing something. When I run it, the majority
>>> of the time I get traceback ending in ldap.SUCCESS
>>> instead of the expected output. Eventually, if I run
>>> it enough times, it spits out my data instead of
>>> ldap.SUCCESS
>>
>> Well, my crystal ball is blurry... ;-)
>
> Sorry, I just figured maybe it was an obvious thing
> that was easy to detect by a list member.
>
> I ended up figuring it out a few hours after posting.
>
> I was using search instead of search_s, so was seeing
> the asynchrony mostly instead of results every time.

I see this only very sporadically from a batch job that runs from cron 
every 5 minutes. Because it's so sporadic, I've never tried very hard to 
figure it out.

In this case, I can't find anywhere that I've mistakenly called the 
non-synchronous variant of the search method. Is there any other reason 
why this exception would be thrown?

-- 
Russell A Jackson <raj at csub.edu>
Network Analyst
California State University, Bakersfield


More information about the python-ldap mailing list