summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/setup.py8
-rw-r--r--client/src/leap/soledad/client/api.py4
-rw-r--r--client/src/leap/soledad/client/encdecpool.py2
-rw-r--r--common/setup.py22
-rw-r--r--common/src/leap/soledad/common/tests/test_sync_mutex.py6
-rw-r--r--server/setup.py8
6 files changed, 21 insertions, 29 deletions
diff --git a/client/setup.py b/client/setup.py
index 5d9955e6..dc555641 100644
--- a/client/setup.py
+++ b/client/setup.py
@@ -20,6 +20,9 @@ setup file for leap.soledad.client
import re
from setuptools import setup
from setuptools import find_packages
+from setuptools import Command
+
+from pkg import utils
import versioneer
versioneer.versionfile_source = 'src/leap/soledad/client/_version.py'
@@ -27,8 +30,6 @@ versioneer.versionfile_build = 'leap/soledad/client/_version.py'
versioneer.tag_prefix = '' # tags are like 1.2.0
versioneer.parentdir_prefix = 'leap.soledad.client-'
-from pkg import utils
-
trove_classifiers = (
"Development Status :: 3 - Alpha",
@@ -60,9 +61,6 @@ if len(_version_short) > 0:
cmdclass = versioneer.get_cmdclass()
-from setuptools import Command
-
-
class freeze_debianver(Command):
"""
Freezes the version in a debian branch.
diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py
index b91e497f..7afc9c6c 100644
--- a/client/src/leap/soledad/client/api.py
+++ b/client/src/leap/soledad/client/api.py
@@ -222,8 +222,8 @@ class Soledad(object):
soledad_assert_type(self._passphrase, unicode)
def initialize(attr, val):
- return ((getattr(self, attr, None) is None)
- and setattr(self, attr, val))
+ return ((getattr(self, attr, None) is None) and
+ setattr(self, attr, val))
initialize("_secrets_path", os.path.join(
self.default_prefix, self.secrets_file_name))
diff --git a/client/src/leap/soledad/client/encdecpool.py b/client/src/leap/soledad/client/encdecpool.py
index 69b0556b..2ad98767 100644
--- a/client/src/leap/soledad/client/encdecpool.py
+++ b/client/src/leap/soledad/client/encdecpool.py
@@ -136,6 +136,7 @@ class SyncEncryptDecryptPool(object):
"""
return self._sync_db.runQuery(query, *args)
+
def encrypt_doc_task(doc_id, doc_rev, content, key, secret):
"""
Encrypt the content of the given document.
@@ -419,7 +420,6 @@ class SyncDecrypterPool(SyncEncryptDecryptPool):
self._deferred_init = self._init_db()
self._wait_init_db('_runOperation', '_runQuery')
-
def _wait_init_db(self, *methods):
"""
Methods that need to wait for db initialization.
diff --git a/common/setup.py b/common/setup.py
index 49d94dad..383745dc 100644
--- a/common/setup.py
+++ b/common/setup.py
@@ -17,9 +17,18 @@
"""
setup file for leap.soledad.common
"""
+import binascii
+import json
+from os import listdir
+from os.path import realpath, dirname, isdir, join, isfile, basename
import re
+
from setuptools import setup
from setuptools import find_packages
+from setuptools import Command
+from setuptools.command.develop import develop as _cmd_develop
+
+from pkg import utils
import versioneer
versioneer.versionfile_source = 'src/leap/soledad/common/_version.py'
@@ -27,7 +36,6 @@ versioneer.versionfile_build = 'leap/soledad/common/_version.py'
versioneer.tag_prefix = '' # tags are like 1.2.0
versioneer.parentdir_prefix = 'leap.soledad.common-'
-from pkg import utils
trove_classifiers = (
"Development Status :: 3 - Alpha",
@@ -59,9 +67,6 @@ if len(_version_short) > 0:
cmdclass = versioneer.get_cmdclass()
-from setuptools import Command
-
-
class freeze_debianver(Command):
"""
Freezes the version in a debian branch.
@@ -107,12 +112,6 @@ def get_versions(default={}, verbose=False):
# Couch backend design docs file generation.
#
-from os import listdir
-from os.path import realpath, dirname, isdir, join, isfile, basename
-import json
-import binascii
-
-
old_cmd_sdist = cmdclass["sdist"]
@@ -219,9 +218,6 @@ def build_ddocs_py(basedir=None, with_src=True):
print "Wrote design docs in %s" % (dest_prefix + '/' + ddoc_filename,)
-from setuptools.command.develop import develop as _cmd_develop
-
-
class cmd_develop(_cmd_develop):
def run(self):
# versioneer:
diff --git a/common/src/leap/soledad/common/tests/test_sync_mutex.py b/common/src/leap/soledad/common/tests/test_sync_mutex.py
index 207338e4..a904a940 100644
--- a/common/src/leap/soledad/common/tests/test_sync_mutex.py
+++ b/common/src/leap/soledad/common/tests/test_sync_mutex.py
@@ -121,9 +121,9 @@ class TestSyncMutex(
sync_times.sort(key=lambda s: s['start'])
self.assertTrue(
- sync_times[0]['start'] < sync_times[0]['end']
- and sync_times[0]['end'] < sync_times[1]['start']
- and sync_times[1]['start'] < sync_times[1]['end'])
+ (sync_times[0]['start'] < sync_times[0]['end'] and
+ sync_times[0]['end'] < sync_times[1]['start'] and
+ sync_times[1]['start'] < sync_times[1]['end']))
db.delete_database()
db.close()
diff --git a/server/setup.py b/server/setup.py
index e7ccb4dc..b3942551 100644
--- a/server/setup.py
+++ b/server/setup.py
@@ -21,6 +21,9 @@ import os
import re
from setuptools import setup
from setuptools import find_packages
+from setuptools import Command
+
+from pkg import utils
import versioneer
versioneer.versionfile_source = 'src/leap/soledad/server/_version.py'
@@ -28,8 +31,6 @@ versioneer.versionfile_build = 'leap/soledad/server/_version.py'
versioneer.tag_prefix = '' # tags are like 1.2.0
versioneer.parentdir_prefix = 'leap.soledad.server-'
-from pkg import utils
-
isset = lambda var: os.environ.get(var, None)
if isset('VIRTUAL_ENV') or isset('LEAP_SKIP_INIT'):
data_files = None
@@ -68,9 +69,6 @@ if len(_version_short) > 0:
cmdclass = versioneer.get_cmdclass()
-from setuptools import Command
-
-
class freeze_debianver(Command):
"""
Freezes the version in a debian branch.