jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Raise import error and add appropriate message

Bug: T353387
Change-Id: I93d1c8ce96e37a25973b35ddfd3767226d82fe68
---
M pywikibot/comms/http.py
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 44447e2..65f1333 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -433,9 +433,8 @@
auth = get_authentication(uri)
if auth is not None and len(auth) == 4:
if isinstance(requests_oauthlib, ImportError):
- warn(str(requests_oauthlib), ImportWarning)
- error(f'OAuth authentication not supported: {requests_oauthlib}')
- auth = None
+ pywikibot.error(requests_oauthlib)
+ sys.exit(1)
else:
auth = requests_oauthlib.OAuth1(*auth)


To view, visit change 1035850. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I93d1c8ce96e37a25973b35ddfd3767226d82fe68
Gerrit-Change-Number: 1035850
Gerrit-PatchSet: 7
Gerrit-Owner: Ssm.allrounder <ssm.allrounder@gmail.com>
Gerrit-Reviewer: Ssm.allrounder <ssm.allrounder@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: DannyS712 <dannys712.wiki@gmail.com>
Gerrit-CC: Framawiki <framawiki@tools.wmflabs.org>
Gerrit-CC: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-CC: Mpaa <mpaa.wiki@gmail.com>