diff options
Diffstat (limited to 'tools/mergetools.py')
-rw-r--r-- | tools/mergetools.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/mergetools.py b/tools/mergetools.py index 89ba7b2..3dbe517 100644 --- a/tools/mergetools.py +++ b/tools/mergetools.py @@ -306,11 +306,14 @@ def sendentry(node, baseurl, own_key, paths, entry, ehash): raise e def sendentry_merge(node, baseurl, own_key, paths, entry, ehash): + return sendentries_merge(node, baseurl, own_key, paths, [(ehash, entry)]) + +def sendentries_merge(node, baseurl, own_key, paths, entries): try: + json_entries = [{"entry":base64.b64encode(entry), "treeleafhash":base64.b64encode(hash)} for hash, entry in entries] result = http_request( baseurl + "plop/v1/merge/sendentry", - json.dumps({"entry":base64.b64encode(entry), - "treeleafhash":base64.b64encode(ehash)}), + json.dumps(json_entries), key=own_key, verifynode=node, publickeydir=paths["publickeys"]) return json.loads(result) except urllib2.URLError, e: |