jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1155371?usp=email )
Change subject: IMPR: Add additional informations to Site.login error message
......................................................................
IMPR: Add additional informations to Site.login error message
Wasn't able to reproduce that issue but suggest to delete the cookie
file in such case. Adding the proposal to the error message.
Bug: T395670
Change-Id: I5534f4ef64696debba1856a382a27f10519ea75c
---
M pywikibot/site/_apisite.py
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index 9480955..4dbc723 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -432,10 +432,15 @@
self._loginstatus = login.LoginStatus.AS_USER
return
- pywikibot.error(
+ pywikibot.error(fill(
f"{self.userinfo['name']} != {self.username()} after "
f'{type(self).__name__}.login() and successful '
- f'{type(login_manager).__name__}.login()')
+ f'{type(login_manager).__name__}.login(). You should'
+ ' probably delete the cookie file "pywikibot-'
+ f'{self.username()}.lwp" and re-login. You may use the'
+ ' login script.',
+ 77
+ ))
self._loginstatus = login.LoginStatus.NOT_LOGGED_IN # failure
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1155371?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5534f4ef64696debba1856a382a27f10519ea75c
Gerrit-Change-Number: 1155371
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]