Dolda2000 GitWeb
/
didex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6efe4e2
)
Fixed index bugs.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 30 Mar 2015 01:13:41 +0000
(
03:13
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 30 Mar 2015 01:13:41 +0000
(
03:13
+0200)
didex/index.py
patch
|
blob
|
blame
|
history
diff --git
a/didex/index.py
b/didex/index.py
index
30dcfdf
..
2844de0
100644
(file)
--- a/
didex/index.py
+++ b/
didex/index.py
@@
-155,7
+155,7
@@
class ordered(index, lib.closable):
def _decode(self, d):
k, v = d
- k = self.typ
e
.decode(k)
+ k = self.typ.decode(k)
v = struct.unpack(">Q", v)[0]
return k, v
@@
-212,13
+212,13
@@
class ordered(index, lib.closable):
self.item = StopIteration
def __next__(self):
- if self.item is StopIteration:
- raise StopIteration()
if self.item is None:
if not self.rev:
self.next()
else:
self.prev()
+ if self.item is StopIteration:
+ raise StopIteration()
ret, self.item = self.item, None
return ret