From 3e75bd4d0c20badce69f1c1a221fcdc3b6618804 Mon Sep 17 00:00:00 2001
From: Olivier Mehani <shtrom+mediagoblin@ssji.net>
Date: Tue, 5 May 2020 23:11:26 +1000
Subject: [PATCH] Make ldap plugin python3 compatible
Signed-off-by: Olivier Mehani <shtrom+mediagoblin@ssji.net>
---
mediagoblin/plugins/ldap/README.rst | 2 +-
mediagoblin/plugins/ldap/tools.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mediagoblin/plugins/ldap/README.rst b/mediagoblin/plugins/ldap/README.rst
index 049b5c4d..fe9a96f5 100644
|
a
|
b
|
LDAP server.
|
| 26 | 26 | Set up the LDAP plugin |
| 27 | 27 | ====================== |
| 28 | 28 | |
| 29 | | 1. Install the ``python-ldap`` package. |
| | 29 | 1. Install the ``python3-ldap`` package. |
| 30 | 30 | |
| 31 | 31 | 2. Add the following to your MediaGoblin .ini file in the ``[plugins]`` section:: |
| 32 | 32 | |
diff --git a/mediagoblin/plugins/ldap/tools.py b/mediagoblin/plugins/ldap/tools.py
index 2be2dcd7..9d6d8b2a 100644
|
a
|
b
|
class LDAP(object):
|
| 57 | 57 | email = self._get_email(v, username) |
| 58 | 58 | return username, email |
| 59 | 59 | |
| 60 | | except ldap.LDAPError, e: |
| | 60 | except ldap.LDAPError as e: |
| 61 | 61 | _log.info(e) |
| 62 | 62 | |
| 63 | 63 | finally: |