Projet

Général

Profil

0001-ldap_backend-do-not-traceback-on-synchronization-fix.patch

Benjamin Dauvergne, 05 novembre 2015 16:38

Télécharger (1,17 ko)

Voir les différences:

Subject: [PATCH] ldap_backend: do not traceback on synchronization (fixes
 #8885)

If we cannot connect to the LDAP servers during a synchronization, we log a
warning.
 src/authentic2/backends/ldap_backend.py | 4 ++++
 1 file changed, 4 insertions(+)
src/authentic2/backends/ldap_backend.py
922 922

  
923 923
    @classmethod
924 924
    def get_users(cls):
925
        logger = logging.getLogger(__name__)
925 926
        for block in cls.get_config():
926 927
            conn = get_connection(block)
928
            if conn is None:
929
                logger.warning(u'unable to synchronize with LDAP servers %r', block['url'])
930
                continue
927 931
            user_basedn = block.get('user_basedn') or block['basedn']
928 932
            user_filter = block['user_filter'].replace('%s', '*')
929 933
            attrs = block['attributes']
930
-