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,7 +146,8 @@ class IteratorStorage(IteratorCompare):
tinfo = next(it)
self.assertEqual(1, len(list(tinfo)))
self.assertEqual(1, len(list(tinfo)))
it.close()
if hasattr(it, 'close'):
it.close()
def checkIterateWhileWriting(self):
self._dostore()
......
......@@ -87,7 +87,8 @@ class HexStorage(object):
for t in it:
yield Transaction(self, t)
finally:
it.close()
if hasattr(it, 'close'):
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