Revision: 7051
Author: russblau
Date: 2009-07-13 13:32:21 +0000 (Mon, 13 Jul 2009)
Log Message:
-----------
Check for and catch race condition.
Modified Paths:
--------------
branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/scripts/category_redirect.py
===================================================================
--- branches/rewrite/scripts/category_redirect.py 2009-07-13 13:30:13 UTC (rev 7050)
+++ branches/rewrite/scripts/category_redirect.py 2009-07-13 13:32:21 UTC (rev 7051)
@@ -413,6 +413,10 @@
problems.append(
u"# %s is a self-linked redirect"
% page.title(asLink=True, textlink=True))
+ except RuntimeError:
+ # race condition: someone else removed the redirect while we
+ # were checking for it
+ continue
if target.namespace() == 14:
# this is a hard-redirect to a category page
newtext = (u"{{%(template)s|%(cat)s}}"
Show replies by date