jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1035850?usp=email )
Change subject: Raise import error and add appropriate message
......................................................................
Raise import error and add appropriate message
Bug: T353387
Change-Id: I93d1c8ce96e37a25973b35ddfd3767226d82fe68
---
M pywikibot/comms/http.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
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
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1035850?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: I93d1c8ce96e37a25973b35ddfd3767226d82fe68
Gerrit-Change-Number: 1035850
Gerrit-PatchSet: 7
Gerrit-Owner: Ssm.allrounder <[email protected]>
Gerrit-Reviewer: Ssm.allrounder <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: DannyS712 <[email protected]>
Gerrit-CC: Framawiki <[email protected]>
Gerrit-CC: JJMC89 <[email protected]>
Gerrit-CC: Mpaa <[email protected]>
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]