VcamX has uploaded a new change for review. https://gerrit.wikimedia.org/r/192178
Change subject: Postpone botflag checking in Page ...................................................................... Postpone botflag checking in Page Postpone botflag checking of save() in Page to editpage() in Site. bug: T57140 Change-Id: I07b50032846423d38bfd976656d7f8001074de2c --- M pywikibot/page.py M pywikibot/site.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/78/192178/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index e7a4a91..1f4c866 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1026,8 +1026,6 @@ if not force and not self.botMayEdit(): raise pywikibot.OtherPageSaveError( self, "Editing restricted by {{bots}} template") - if botflag is None: - botflag = ("bot" in self.site.userinfo["rights"]) if async: pywikibot.async_request(self._save, comment=comment, minor=minor, watchval=watchval, botflag=botflag, diff --git a/pywikibot/site.py b/pywikibot/site.py index 4bc67d7..2c36ffa 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4068,6 +4068,8 @@ if not recreate: raise token = self.tokens['edit'] + if bot is None: + bot = ("bot" in self.userinfo["rights"]) self.lock_page(page) params = dict(action="edit", title=page.title(withSection=False), -- To view, visit https://gerrit.wikimedia.org/r/192178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07b50032846423d38bfd976656d7f8001074de2c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: VcamX <vca...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits