From 7ef2f034b0766472cc7de880bd5a5d586b30a53a Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 8 Nov 2011 00:17:29 -0500 Subject: [PATCH] A couple of fixes --- bot/tasks/afc_statistics.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bot/tasks/afc_statistics.py b/bot/tasks/afc_statistics.py index f15934d..b8d291e 100644 --- a/bot/tasks/afc_statistics.py +++ b/bot/tasks/afc_statistics.py @@ -267,7 +267,7 @@ class Task(BaseTask): query = "SELECT page_id, page_modify_oldid FROM page WHERE page_title = ?" with self.conn.cursor() as cursor: - cursor.execute(query, (title,)) + cursor.execute(query, (title.replace("_", " "),)) try: pageid, oldid = cursor.fetchall()[0] except IndexError: @@ -613,7 +613,10 @@ class Task(BaseTask): notes += "|no=1" # Submission hasn't been touched in over 4 days creator = self.site.get_user(c_user) - if creator.blockinfo(): - notes += "|nb=1" # Submitter is blocked + try: + if creator.blockinfo(): + notes += "|nb=1" # Submitter is blocked + except wiki.UserNotFoundError: # Likely an IP + pass return notes