http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9319
Revision: 9319 Author: russblau Date: 2011-06-28 15:12:48 +0000 (Tue, 28 Jun 2011) Log Message: ----------- add another null-edit step, to address false-positives in non-empty category listings
Modified Paths: -------------- branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/scripts/category_redirect.py =================================================================== --- branches/rewrite/scripts/category_redirect.py 2011-06-27 08:20:24 UTC (rev 9318) +++ branches/rewrite/scripts/category_redirect.py 2011-06-28 15:12:48 UTC (rev 9319) @@ -354,6 +354,11 @@ asLink=True, textlink=True))) except pywikibot.Error: pass + # do a null edit on cat + try: + cat.put(cat.get(get_redirect=True)) + except: + pass
# delete record entries for non-existent categories for cat_name in record.keys():
pywikipedia-svn@lists.wikimedia.org