Don't call fetch on closed result proxy
"The DBAPI cursor will be closed by the ResultProxy when all of its result rows (if any) are exhausted" See http://docs.sqlalchemy.org/en/latest/core/connections.html
This commit is contained in:
parent
9d0b6503d7
commit
d16f1df8cd
@ -50,6 +50,8 @@ class ResultIter(object):
|
||||
self._iter = None
|
||||
|
||||
def _next_chunk(self):
|
||||
if self.result_proxy.closed:
|
||||
return False
|
||||
if not self.step:
|
||||
chunk = self.result_proxy.fetchall()
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user