From 63532e93c5ab3ee37599510792fbffb7eb59ce90 Mon Sep 17 00:00:00 2001 From: Christoph Erhardt Date: Sun, 8 May 2022 10:18:02 +0200 Subject: [Python 3] some more function and module names changed Summary: some more functions, modules are renamed and some internal functions were moved into other modules Reviewers: #pykolab_developers, sicherha Reviewed By: #pykolab_developers, sicherha Differential Revision: https://git.kolab.org/D3481 --- pykolab/cli/__init__.py | 6 +++++- pykolab/wap_client/__init__.py | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'pykolab') diff --git a/pykolab/cli/__init__.py b/pykolab/cli/__init__.py index 3aafd03..2b3c511 100644 --- a/pykolab/cli/__init__.py +++ b/pykolab/cli/__init__.py @@ -16,7 +16,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # - +try: + # Python 2: "reload" is built-in + reload +except NameError: + from importlib import reload import ldap import ldif import logging diff --git a/pykolab/wap_client/__init__.py b/pykolab/wap_client/__init__.py index f8427c0..176ac91 100644 --- a/pykolab/wap_client/__init__.py +++ b/pykolab/wap_client/__init__.py @@ -1,6 +1,9 @@ import json -import httplib +try: + import httplib +except ImportError: + import http.client as httplib import urllib import sys try: -- cgit v1.1