From 51643149e3eb79452ecb29780199dd54fb770ed2 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 3 Sep 2013 00:33:36 -0400 Subject: [PATCH] Make chart generation faster. --- tasks/afc_statistics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/afc_statistics.py b/tasks/afc_statistics.py index 98c9a92..14f9820 100644 --- a/tasks/afc_statistics.py +++ b/tasks/afc_statistics.py @@ -159,7 +159,7 @@ class AFCStatistics(Task): query = "SELECT * FROM page JOIN row ON page_id = row_id WHERE row_chart = ?" with self.conn.cursor(oursql.DictCursor) as cursor: cursor.execute(query, (chart_id,)) - for page in cursor: + for page in cursor.fetchall(): chart += "\n" + self.compile_chart_row(page) chart += "\n{{" + self.tl_footer + "}}"