summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/src/leap/soledad/common/l2db/__init__.py5
-rw-r--r--common/src/leap/soledad/common/l2db/backends/__init__.py5
-rw-r--r--common/src/leap/soledad/common/l2db/backends/inmemory.py5
-rw-r--r--common/src/leap/soledad/common/l2db/backends/sqlite_backend.py9
-rw-r--r--common/src/leap/soledad/common/l2db/remote/basic_auth_middleware.py6
-rw-r--r--common/src/leap/soledad/common/l2db/remote/http_app.py5
-rw-r--r--common/src/leap/soledad/common/l2db/remote/http_client.py5
-rw-r--r--common/src/leap/soledad/common/l2db/remote/http_database.py5
-rw-r--r--common/src/leap/soledad/common/l2db/remote/http_target.py5
9 files changed, 12 insertions, 38 deletions
diff --git a/common/src/leap/soledad/common/l2db/__init__.py b/common/src/leap/soledad/common/l2db/__init__.py
index c0bd15fe..568897c4 100644
--- a/common/src/leap/soledad/common/l2db/__init__.py
+++ b/common/src/leap/soledad/common/l2db/__init__.py
@@ -16,10 +16,7 @@
"""L2DB"""
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
from leap.soledad.common.l2db.errors import InvalidJSON, InvalidContent
diff --git a/common/src/leap/soledad/common/l2db/backends/__init__.py b/common/src/leap/soledad/common/l2db/backends/__init__.py
index 922daafd..c731c3d3 100644
--- a/common/src/leap/soledad/common/l2db/backends/__init__.py
+++ b/common/src/leap/soledad/common/l2db/backends/__init__.py
@@ -17,10 +17,7 @@
"""Abstract classes and common implementations for the backends."""
import re
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
import uuid
from leap.soledad.common import l2db
diff --git a/common/src/leap/soledad/common/l2db/backends/inmemory.py b/common/src/leap/soledad/common/l2db/backends/inmemory.py
index 06a934a6..6fd251af 100644
--- a/common/src/leap/soledad/common/l2db/backends/inmemory.py
+++ b/common/src/leap/soledad/common/l2db/backends/inmemory.py
@@ -16,10 +16,7 @@
"""The in-memory Database class for U1DB."""
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
from leap.soledad.common.l2db import (
Document, errors,
diff --git a/common/src/leap/soledad/common/l2db/backends/sqlite_backend.py b/common/src/leap/soledad/common/l2db/backends/sqlite_backend.py
index ba273039..d73c0d16 100644
--- a/common/src/leap/soledad/common/l2db/backends/sqlite_backend.py
+++ b/common/src/leap/soledad/common/l2db/backends/sqlite_backend.py
@@ -21,17 +21,14 @@ A L2DB implementation that uses SQLite as its persistence layer.
import errno
import os
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
-from sqlite3 import dbapi2
+import json
import sys
import time
import uuid
-
import pkg_resources
+from sqlite3 import dbapi2
+
from leap.soledad.common.l2db.backends import CommonBackend, CommonSyncTarget
from leap.soledad.common.l2db import (
Document, errors,
diff --git a/common/src/leap/soledad/common/l2db/remote/basic_auth_middleware.py b/common/src/leap/soledad/common/l2db/remote/basic_auth_middleware.py
index a2cbff62..96d0d872 100644
--- a/common/src/leap/soledad/common/l2db/remote/basic_auth_middleware.py
+++ b/common/src/leap/soledad/common/l2db/remote/basic_auth_middleware.py
@@ -15,10 +15,8 @@
# along with u1db. If not, see <http://www.gnu.org/licenses/>.
"""U1DB Basic Auth authorisation WSGI middleware."""
import httplib
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
+
from wsgiref.util import shift_path_info
diff --git a/common/src/leap/soledad/common/l2db/remote/http_app.py b/common/src/leap/soledad/common/l2db/remote/http_app.py
index 65277bd1..5cf6645e 100644
--- a/common/src/leap/soledad/common/l2db/remote/http_app.py
+++ b/common/src/leap/soledad/common/l2db/remote/http_app.py
@@ -23,10 +23,7 @@ HTTP Application exposing U1DB.
import functools
import httplib
import inspect
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
import sys
import urlparse
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 a65264b6..53363c0a 100644
--- a/common/src/leap/soledad/common/l2db/remote/http_client.py
+++ b/common/src/leap/soledad/common/l2db/remote/http_client.py
@@ -17,10 +17,7 @@
"""Base class to make requests to a remote HTTP server."""
import httplib
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
import socket
import ssl
import sys
diff --git a/common/src/leap/soledad/common/l2db/remote/http_database.py b/common/src/leap/soledad/common/l2db/remote/http_database.py
index b2b48dee..7512379f 100644
--- a/common/src/leap/soledad/common/l2db/remote/http_database.py
+++ b/common/src/leap/soledad/common/l2db/remote/http_database.py
@@ -16,10 +16,7 @@
"""HTTPDatabase to access a remote db over the HTTP API."""
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
import uuid
from leap.soledad.common.l2db import (
diff --git a/common/src/leap/soledad/common/l2db/remote/http_target.py b/common/src/leap/soledad/common/l2db/remote/http_target.py
index 7e7f366f..38804f01 100644
--- a/common/src/leap/soledad/common/l2db/remote/http_target.py
+++ b/common/src/leap/soledad/common/l2db/remote/http_target.py
@@ -16,10 +16,7 @@
"""SyncTarget API implementation to a remote HTTP server."""
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import json
from leap.soledad.common.l2db import Document, SyncTarget
from leap.soledad.common.l2db.errors import BrokenSyncStream