Make ldap plugin python3 compatible
authorOlivier Mehani <shtrom+mediagoblin@ssji.net>
Tue, 5 May 2020 13:11:26 +0000 (23:11 +1000)
committerBen Sturmfels <ben@sturm.com.au>
Wed, 6 May 2020 02:03:28 +0000 (12:03 +1000)
Signed-off-by: Olivier Mehani <shtrom+mediagoblin@ssji.net>
mediagoblin/plugins/ldap/README.rst
mediagoblin/plugins/ldap/tools.py

index 049b5c4d93c405450162120257acfe08ac4c7e11..fe9a96f55e44c7bc452280f7dee1b0357c7d9495 100644 (file)
@@ -26,7 +26,7 @@ LDAP server.
 Set up the LDAP plugin
 ======================
 
-1. Install the ``python-ldap`` package.
+1. Install the ``python3-ldap`` package.
 
 2. Add the following to your MediaGoblin .ini file in the ``[plugins]`` section::
 
index 2be2dcd74aaf3f283144aae82b48c6244e90a930..9d6d8b2aaa56276dc88be55cf010cbe3e6bf5c44 100644 (file)
@@ -57,7 +57,7 @@ class LDAP(object):
                 email = self._get_email(v, username)
                 return username, email
 
-            except ldap.LDAPError, e:
+            except ldap.LDAPError as e:
                 _log.info(e)
 
             finally: