Skip to content

Commit bdda4c6

Browse files
committed
Use fetchall instead of listing the cursor
1 parent c939d9b commit bdda4c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postgres.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def fetchall(self, sql, parameters=None):
215215
"""
216216
with self.get_cursor() as cursor:
217217
cursor.execute(sql, parameters)
218-
return list(cursor)
218+
return cursor.fetchall()
219219

220220
def get_cursor(self, *a, **kw):
221221
"""Return a :py:class:`~postgres.CursorContextManager` that uses our

0 commit comments

Comments
 (0)