jenkins-bot has submitted this change and it was merged.
Change subject: Update category.py to use action=move to move categories ......................................................................
Update category.py to use action=move to move categories
Add functionality to apply the new, previously unavailable "action=move" function to category pages with category.py. Check if the bot account has the "category-movepages" right, if not then default to previous functionality.
Bug: 65115 Change-Id: I1a21e18da4f15ac8ba4eb0967fdbb64eafe5a4e6 --- M scripts/category.py 1 file changed, 5 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/category.py b/scripts/category.py index 535b34d..3f31054 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -467,8 +467,11 @@ For readability it is splitted into several helper functions. """ if self.newcat and self.move_oldcat and not self.newcat.exists(): - self._movecat() - self._movetalk() + if "move-categorypages" in self.site.userinfo["rights"]: + self.oldcat.move(self.newcat, reason=self.comment, movetalkpage=True) + else: + self._movecat() + self._movetalk() if self.history: self._hist() self._change(pagegenerators.CategorizedPageGenerator(self.oldcat))
pywikibot-commits@lists.wikimedia.org