Commit 79d2cc9c authored by Albertas Agejevas's avatar Albertas Agejevas

Hedge when using the transaction iterator's close method.

The close() method is not in the interface and is not provided
by ZEO's implementation.
parent ec74fe23
......@@ -146,6 +146,7 @@ class IteratorStorage(IteratorCompare):
tinfo = next(it)
self.assertEqual(1, len(list(tinfo)))
self.assertEqual(1, len(list(tinfo)))
if hasattr(it, 'close'):
it.close()
def checkIterateWhileWriting(self):
......
......@@ -87,6 +87,7 @@ class HexStorage(object):
for t in it:
yield Transaction(self, t)
finally:
if hasattr(it, 'close'):
it.close()
def storeBlob(self, oid, oldserial, data, blobfilename, version,
......
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