Ladsgroup has uploaded a new change for review.
https://gerrit.wikimedia.org/r/94496
Change subject: Removing nonsense comments and not letting edit when no change
can be made
......................................................................
Removing nonsense comments and not letting edit when no change can be made
It puts pressure on server and causes bugs like this, Implemented from compat
Bug: 55275
Change-Id: I6e17e1cb10179adfb7cb373096fbe24617d79159
---
M scripts/category_redirect.py
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/96/94496/1
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 17053ff..1565bf4 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -100,13 +100,11 @@
newtext = pywikibot.replaceCategoryInPlace(oldtext, oldCat, newCat,
site=self.site)
try:
- # even if no changes, still save the page, in case it needs
- # an update due to changes in a transcluded template
- article.put(newtext, comment)
if newtext == oldtext:
pywikibot.output(u'No changes in made in page %s.'
% article.title(asLink=True))
return False
+ article.put(newtext, comment)
return True
except pywikibot.EditConflict:
pywikibot.output(u'Skipping %s because of edit conflict'
--
To view, visit https://gerrit.wikimedia.org/r/94496
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e17e1cb10179adfb7cb373096fbe24617d79159
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits