From 4003711724ee620b2c163acedd900a81d240ccfd Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 20 Jul 2012 15:16:23 -0400 Subject: [PATCH] Forgot we can't iterate over cursor.execute()... --- pages/copyvios.mako | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/copyvios.mako b/pages/copyvios.mako index b054d72..6bb9cc6 100644 --- a/pages/copyvios.mako +++ b/pages/copyvios.mako @@ -190,7 +190,8 @@ def synchronize_sites_with_db(cursor, updates, q_list, q_rmv, q_update): removals = [] - for site in cursor.execute(q_list): + cursor.execute(q_list) + for site in cursor: updates.remove(site) if site in updates else removals.append(site) cursor.executemany(q_rmv, removals) cursor.executemany(q_update, updates)