[Pywikipedia-l] SVN: [6236] trunk/pywikipedia/category.py
multichill at svn.wikimedia.org
multichill at svn.wikimedia.org
Fri Jan 9 19:04:38 UTC 2009
Revision: 6236
Author: multichill
Date: 2009-01-09 19:04:37 +0000 (Fri, 09 Jan 2009)
Log Message:
-----------
Removed the use of wikipedia.setAction() in CategoryMoveRobot. Still have to remove it from the other bots.
Modified Paths:
--------------
trunk/pywikipedia/category.py
Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py 2009-01-09 15:37:41 UTC (rev 6235)
+++ trunk/pywikipedia/category.py 2009-01-09 19:04:37 UTC (rev 6236)
@@ -403,11 +403,8 @@
self.deleteEmptySourceCat = deleteEmptySourceCat
self.titleRegex = titleRegex
# set edit summary message
- if self.editSummary:
- wikipedia.setAction(self.editSummary)
- else:
- wikipedia.setAction(wikipedia.translate(site, msg_change)
- % self.oldCat.title())
+ if not self.editSummary:
+ self.editSummary = wikipedia.translate(site, msg_change)% self.oldCat.title()
def run(self):
site = wikipedia.getSite()
@@ -446,7 +443,7 @@
if not self.titleRegex or re.search(self.titleRegex,
article.title()):
catlib.change_category(article, self.oldCat, newCat,
- inPlace=self.inPlace)
+ comment=self.editSummary, inPlace=self.inPlace)
# Move subcategories
gen = pagegenerators.SubCategoriesPageGenerator(self.oldCat,
@@ -456,7 +453,7 @@
if not self.titleRegex or re.search(self.titleRegex,
subcategory.title()):
catlib.change_category(subcategory, self.oldCat, newCat,
- inPlace=self.inPlace)
+ comment=self.editSummary, inPlace=self.inPlace)
# Delete the old category and its moved talk page
if copied and self.deleteEmptySourceCat == True:
More information about the Pywikipedia-l
mailing list