Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117817702
D3878.1775287831.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
768 B
Referenced Files
None
Subscribers
None
D3878.1775287831.diff
View Options
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 = ""
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 7:30 AM (12 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828520
Default Alt Text
D3878.1775287831.diff (768 B)
Attached To
Mode
D3878: [Python 3] urllib.urlencode / httplib module change
Attached
Detach File
Event Timeline