diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-09-11 11:07:42 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-09-11 11:22:59 -0300 |
commit | 70aa789c94b0dcced535cee86243e2dd4113b28a (patch) | |
tree | f1f29c1bbd196b968ce5673f24b887dcc83d7364 /src/leap/soledad | |
parent | f5e2ec7f1901863ce967a91cf0a244b771bcf857 (diff) |
[style] fixes from code review
Diffstat (limited to 'src/leap/soledad')
-rw-r--r-- | src/leap/soledad/client/_db/blobs.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py index db9ce00d..0374ae94 100644 --- a/src/leap/soledad/client/_db/blobs.py +++ b/src/leap/soledad/client/_db/blobs.py @@ -233,7 +233,7 @@ class BlobManager(object): data = yield self._client.get(uri, params=params) defer.returnValue((yield data.json())) - def local_list(self, namespace='', sync_status=False): + def local_list(self, namespace='', sync_status=None): return self.local.list(namespace, sync_status) @defer.inlineCallbacks @@ -545,7 +545,10 @@ def _init_blob_table(conn): conn.execute('ALTER TABLE blobs ADD COLUMN namespace TEXT') if 'sync_status' not in columns: # sync status migration - conn.execute('ALTER TABLE blobs ADD COLUMN sync_status INT default 2') + default_status = SyncStatus.PENDING_UPLOAD + sync_column = 'ALTER TABLE blobs ADD COLUMN sync_status INT default %s' + sync_column %= default_status + conn.execute(sync_column) conn.execute('ALTER TABLE blobs ADD COLUMN retries INT default 0') |