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

Jeroen van Meeuwen (Kolab Systems) vanmeeuwen at kolabsys.com
Sun Feb 16 11:28:39 CET 2014


On 2014-02-16 03:30, Paul Boddie wrote:
> 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.
> 

That's something new for me, I wasn't aware of try/except/else to be 
honest. I just committed something different with connected being set to 
True right after primary_auth.connect().

Kind regards,

Jeroen van Meeuwen

-- 
Systems Architect, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
m: +44 74 2516 3817
w: http://www.kolabsys.com

pgp: 9342 BF08


More information about the devel mailing list