mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Stylefixes
This commit is contained in:
parent
5f80b9f3f6
commit
211ff0e889
2 changed files with 9 additions and 1 deletions
|
|
@ -126,7 +126,13 @@ def test_already_synced():
|
||||||
a.upload(item)
|
a.upload(item)
|
||||||
b.upload(item)
|
b.upload(item)
|
||||||
status = {
|
status = {
|
||||||
'1': ({'href': '1.a', 'etag': a.get('1.a')[1]}, {'href': '1.b', 'etag': b.get('1.b')[1]})
|
'1': ({
|
||||||
|
'href': '1.a',
|
||||||
|
'etag': a.get('1.a')[1]
|
||||||
|
}, {
|
||||||
|
'href': '1.b',
|
||||||
|
'etag': b.get('1.b')[1]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
old_status = dict(status)
|
old_status = dict(status)
|
||||||
a.update = b.update = a.upload = b.upload = \
|
a.update = b.update = a.upload = b.upload = \
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ def _status_migrate(status):
|
||||||
'etag': etag_b,
|
'etag': etag_b,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
def _compress_meta(meta):
|
def _compress_meta(meta):
|
||||||
'''Make in-memory metadata suitable for disk storage by removing fetched
|
'''Make in-memory metadata suitable for disk storage by removing fetched
|
||||||
item content'''
|
item content'''
|
||||||
|
|
@ -169,6 +170,7 @@ def _compress_meta(meta):
|
||||||
'hash': meta['item'].hash
|
'hash': meta['item'].hash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def sync(storage_a, storage_b, status, conflict_resolution=None,
|
def sync(storage_a, storage_b, status, conflict_resolution=None,
|
||||||
force_delete=False):
|
force_delete=False):
|
||||||
'''Synchronizes two storages.
|
'''Synchronizes two storages.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue