jenkins-bot submitted this change.
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.