From 706299ee784f1f792ff4ccbaf70b34ad17403cc7 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 6 Nov 2011 15:20:04 -0500 Subject: [PATCH] Fix logger, title splitting, and revid parsing (get_content()) --- bot/tasks/afc_statistics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/tasks/afc_statistics.py b/bot/tasks/afc_statistics.py index 1ea3ea0..824709e 100644 --- a/bot/tasks/afc_statistics.py +++ b/bot/tasks/afc_statistics.py @@ -205,7 +205,7 @@ class Task(BaseTask): for pageid, title, oldid in cursor: msg = "Updating page [[{0}]] (id: {1}) @ {2}" - self.logger.debug(msg.format(pageid, title, oldid)) + self.logger.debug(msg.format(title, pageid, oldid)) result = list(self.site.sql_query(query2, (pageid,))) if not result: self.untrack_page(cursor, pageid) @@ -427,8 +427,8 @@ class Task(BaseTask): base = title ns = wiki.NS_MAIN - result = self.site.sql_query(query, (base, ns)) - revid = list(result)[0] + result = self.site.sql_query(query, (base.replace(" ", "_"), ns)) + revid = int(list(result)[0][0]) res = self.site.api_query(action="query", prop="revisions", revids=revid, rvprop="content")