Index: pykolab/wap_client/__init__.py =================================================================== --- pykolab/wap_client/__init__.py +++ pykolab/wap_client/__init__.py @@ -1,12 +1,18 @@ import json -import httplib -import urllib -import sys +import sys +try: + import httplib +except ImportError: + import http.client as httplib try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse +try: + from urllib import urlencode +except ImportError: + from urllib.parse import urlencode import pykolab @@ -412,7 +418,7 @@ conn.set_debuglevel(9) if not get == None: - _get = "?%s" % (urllib.urlencode(get)) + _get = "?%s" % (urlencode(get)) else: _get = ""