[Kolab-devel] Upgrade report 3.1 to 3.2 on Debian Wheezy

Paul Boddie paul at boddie.org.uk
Sun Feb 16 03:30:31 CET 2014


On Sunday 16. February 2014 02.36.24 Jeroen van Meeuwen (Kolab Systems) wrote:
> On 2014-02-16 00:52, Paul Boddie wrote:
> > 
> > http://git.kolab.org/pykolab/tree/kolabd/__init__.py#n223
> > 
> > In effect, the LDAP connection loop can never terminate because it will
> > never
> > get a true value from the connect method being called. I've attached a
> > patch
> > that should fix this, and it seems to have worked for me.
> 
> So the fix in this case is to first try/except connecting, then in try
> set connected to True.
> 
> Your patch added an else/break some place two tabs in, which I wasn't
> sure would need to be translated to 4*4 spaces or ended up in the middle
> of nowhere.

I must have had hard tabs enabled in my editor. Sorry about that! What you 
need is...

            while 1:
                try:
                    primary_auth.connect()
                except Exception, errmsg:
                    log.error(_("Could not connect to LDAP, is it running?"))
                    time.sleep(5)
                else:
                    break

...where exceptions keep the loop going and where a lack of exceptions cause a 
break of the loop.

Paul


More information about the devel mailing list