Commit b07519b5 authored by Marius Gedminas's avatar Marius Gedminas

Fix ResourceWarnings caused by HexStorage.iterator()

parent 4bdf0547
......@@ -82,8 +82,12 @@ class HexStorage(object):
transaction)
def iterator(self, start=None, stop=None):
for t in self.base.iterator(start, stop):
yield Transaction(self, t)
it = self.base.iterator(start, stop)
try:
for t in it:
yield Transaction(self, t)
finally:
it.close()
def storeBlob(self, oid, oldserial, data, blobfilename, version,
transaction):
......
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