Dbarrett has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/361873 )
Change subject: Add a comment. ...................................................................... Add a comment. Add details about a non-intuitive piece of code that applies only to private wikis. Bug: T153903 Change-Id: I437d03d89dd23f8a4cde5f29212ba0e19b5817f1 --- M pywikibot/data/api.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/73/361873/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 3781159..5adda5e 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1682,6 +1682,11 @@ if self.action == 'query': meta = self._params.get("meta", []) + # Special logic for private wikis (T153903). + # If the wiki requires login privileges to read articles, pywikibot + # will be blocked from accessing the userinfo. + # Work around this by requiring userinfo only if 'tokens' and 'login' + # are not both set. typep = self._params.get("type", []) if "userinfo" not in meta and not ("tokens" in meta and "login" in typep): meta = set(meta + ['userinfo']) -- To view, visit https://gerrit.wikimedia.org/r/361873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I437d03d89dd23f8a4cde5f29212ba0e19b5817f1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Dbarrett <mediaw...@blazemonger.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits