Stylefixes

This commit is contained in:
Markus Unterwaditzer 2015-11-28 16:08:17 +01:00
parent 5f80b9f3f6
commit 211ff0e889
2 changed files with 9 additions and 1 deletions

View file

@ -126,7 +126,13 @@ def test_already_synced():
a.upload(item)
b.upload(item)
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)
a.update = b.update = a.upload = b.upload = \

View file

@ -160,6 +160,7 @@ def _status_migrate(status):
'etag': etag_b,
})
def _compress_meta(meta):
'''Make in-memory metadata suitable for disk storage by removing fetched
item content'''
@ -169,6 +170,7 @@ def _compress_meta(meta):
'hash': meta['item'].hash
}
def sync(storage_a, storage_b, status, conflict_resolution=None,
force_delete=False):
'''Synchronizes two storages.