From 5600eb14c16d419068375d4c1e2dc1ca115b099d Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 29 Sep 2017 10:35:40 -0500 Subject: [PATCH] banner_untag: Fix when page is deleted. --- tasks/banner_untag.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/banner_untag.py b/tasks/banner_untag.py index 66c2e63..61e44c9 100644 --- a/tasks/banner_untag.py +++ b/tasks/banner_untag.py @@ -67,6 +67,11 @@ class BannerUntag(Task): stage2 = [] for pagedata in res["query"]["pages"]: pageid = pagedata["pageid"] + if "title" not in pagedata: + self.logger.info(u"Skipping [[%s]], doesn't exist" % title) + donefile.write("%d\n" % pageid) + continue + title = pagedata["title"] revid = pagedata["revisions"][0]["revid"] parentid = pagedata["revisions"][0]["parentid"]