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

"Jeroen van Meeuwen (Kolab Systems)" <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.