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

Paul Boddie <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <201402161320.35220.paul__22623.2604276904$1392552427$gmane$org@boddie.org.uk>
On Sunday 16. February 2014 11.28.39 Jeroen van Meeuwen (Kolab Systems) wrote:
> 
> 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().

Well, the following is effectively equivalent:

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

The else clause is pretty narrow in terms of benefits, really.

Paul
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.