jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] TokenWallet: Assert a username
......................................................................


[FIX] TokenWallet: Assert a username

Follow up to Iccce554b5c9e83a42ae87c0bd69e38f880e3f6ac

Fixes another place where assert would fail if the
sysop username is different to the normal username.

Bug: T74238
Change-Id: I7c438e16d40ff7128980fd2eecf1575eeac40114
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 48aafc8..6fa32a7 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1331,7 +1331,7 @@
             in one request.
         @type all: bool
         """
-        assert(self.site.logged_in())
+        assert(self.site.user())
 
         self._tokens.setdefault(self.site.user(), {}).update(
             self.site.get_tokens(types, all=all))

-- 
To view, visit https://gerrit.wikimedia.org/r/181353
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c438e16d40ff7128980fd2eecf1575eeac40114
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Unicodesnowman <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to