Commit 9771a14c authored by Roel Bruggink's avatar Roel Bruggink Committed by Kirill Smelkov

Raise POSKeyError instead of KeyError in loadBefore. (#6)

This prevents a KeyError: '\x00\x00\x00\x00\x00\x00\x00\x00'
parent 4c235251
Changelog Changelog
========= =========
- Raise POSKeyError instead of KeyError in loadBefore.
3.0 - 2016-04-03 3.0 - 2016-04-03
---------------- ----------------
......
...@@ -192,7 +192,7 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -192,7 +192,7 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
try: try:
tids = [stid for soid, stid in self._conflict_cache if soid == oid] tids = [stid for soid, stid in self._conflict_cache if soid == oid]
if not tids: if not tids:
raise KeyError(oid) raise POSException.POSKeyError(oid)
tids.sort() tids.sort()
i = bisect.bisect_left(tids, tid) -1 i = bisect.bisect_left(tids, tid) -1
if i == -1: if i == -1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment