jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/917357 )

Change subject: [tests] Skip requests.exceptions.Timeout in 
HttpbinTestCase.fetch()
......................................................................

[tests] Skip requests.exceptions.Timeout in HttpbinTestCase.fetch()

Change-Id: Ib416cfd6b98e1b80eace1297bf08f28065ec5319
---
M pywikibot/comms/http.py
1 file changed, 14 insertions(+), 0 deletions(-)

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




diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 319f512..3edca31 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -326,6 +326,11 @@
            and re.search(r'\[Errno (-2|8|11001)\]', msg):
             raise ConnectionError(response)

+    # catch requests.ReadTimeout and requests.ConnectTimeout and convert
+    # it to ServerError
+    if isinstance(response, requests.Timeout):
+        raise ServerError(response)
+
     if isinstance(response, Exception):
         with suppress(Exception):
             # request exception may contain response and request attribute

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/917357
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib416cfd6b98e1b80eace1297bf08f28065ec5319
Gerrit-Change-Number: 917357
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org

Reply via email to