Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
change logging a bit, we modified old inflight
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed May 6, 2016
1 parent 7d1a6e1 commit 55ace78
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cipher/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def _p_resolveConflict(self, old, committed, new):
LOG.exception("Can't resolve 'clear'")
raise ConflictError("Can't resolve 'clear'")

# save old state
old_log = pprint.pformat(old)

result = old.copy()
c_new = {}
result_data = result['data']
Expand All @@ -82,8 +85,8 @@ def _p_resolveConflict(self, old, committed, new):

for k, v in new['data'].items():
if k in c_new:
rows = ["Conflicting insert"]
for data in (old, committed, new, k, v, c_new):
rows = ["Conflicting insert", old_log]
for data in (committed, new, k, v, c_new, result):
rows.append(pprint.pformat(data))
LOG.exception('\n----\n'.join(rows))
raise ConflictError("Conflicting insert")
Expand Down

0 comments on commit 55ace78

Please sign in to comment.