summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorChristoph Erhardt <kolab@sicherha.de>2022-03-13 20:49:38 +0100
committerChristoph Erhardt <kolab@sicherha.de>2022-03-13 20:51:10 +0100
commit4c5fc07c82111a2d4179e39f76bbbd5d194010c8 (patch)
treecc3dc52e33373ce724db5951df432dc03c45940f /pykolab
parent81921eb1f9949abc5dea46823516ab1d33ae4857 (diff)
downloadpykolab-4c5fc07c82111a2d4179e39f76bbbd5d194010c8.tar.gz
[Python 3] dropped module anydbm
Summary: like D3355, Note: The anydbm module has been renamed to dbm in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3. https://docs.python.org/2.7/library/anydbm.html dbm linked to https://docs.python.org/2.7/library/dbm.html#module-dbm Note: The dbm module has been renamed to dbm.ndbm in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3. so I tested db file, created with 2.7 and used with dbm.ndbm in 3.7 Reviewers: #pykolab_developers, sicherha Reviewed By: #pykolab_developers, sicherha Differential Revision: https://git.kolab.org/D3430
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/syncrepl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/syncrepl.py b/pykolab/auth/ldap/syncrepl.py
index 6753605..98c2e11 100644
--- a/pykolab/auth/ldap/syncrepl.py
+++ b/pykolab/auth/ldap/syncrepl.py
@@ -1,6 +1,9 @@
#!/usr/bin/python
-import anydbm
+try:
+ import anydbm
+except:
+ import dbm.ndbm as anydbm
import ldap
import ldap.syncrepl
import ldapurl