summaryrefslogtreecommitdiff
path: root/common/src/leap/soledad/common/l2db/remote/http_client.py
diff options
context:
space:
mode:
authorefkin <efkin@riseup.net>2017-03-13 21:17:18 +0100
committerKali Kaneko <kali@leap.se>2017-03-17 17:52:57 +0100
commit7562655cf4bf28a1ebd6c458334da0c166f34e61 (patch)
tree54bc2de9b71e35d56fdcc3dd1ee9642ce8fd491d /common/src/leap/soledad/common/l2db/remote/http_client.py
parentba3fcb08eafd389bdbf0ab9c59577a25c8d8126d (diff)
[refactor] Improve python3 compatibility
With this commit all tests on py34 tox environment are collected.
Diffstat (limited to 'common/src/leap/soledad/common/l2db/remote/http_client.py')
-rw-r--r--common/src/leap/soledad/common/l2db/remote/http_client.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/src/leap/soledad/common/l2db/remote/http_client.py b/common/src/leap/soledad/common/l2db/remote/http_client.py
index 53363c0a..1124b038 100644
--- a/common/src/leap/soledad/common/l2db/remote/http_client.py
+++ b/common/src/leap/soledad/common/l2db/remote/http_client.py
@@ -16,14 +16,13 @@
"""Base class to make requests to a remote HTTP server."""
-import httplib
import json
import socket
import ssl
import sys
-import urlparse
import urllib
-
+import six.moves.urllib.parse as urlparse
+import six.moves.http_client as httplib
from time import sleep
from leap.soledad.common.l2db import errors
from leap.soledad.common.l2db.remote import http_errors
@@ -168,7 +167,7 @@ class HTTPClientBase(object):
try:
self._conn.request(method, url_query, body, headers)
return self._response()
- except errors.Unavailable, e:
+ except errors.Unavailable as e:
sleep(delay)
raise e