jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/917920 )
Change subject: [fix] Also raise ConnectionError if caused by NameResolutionError ...................................................................... [fix] Also raise ConnectionError if caused by NameResolutionError Bug: T336280 Change-Id: Ia4047e6aa99e7b499115b8fe552d83a6aa56d8b9 --- M pywikibot/comms/http.py 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 319f512..d467708 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -322,7 +322,7 @@ if isinstance(response, requests.ConnectionError): msg = str(response) - if 'NewConnectionError' in msg \ + if ('NewConnectionError' in msg or 'NameResolutionError' in msg) \ and re.search(r'\[Errno (-2|8|11001)\]', msg): raise ConnectionError(response) -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/917920 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: Ia4047e6aa99e7b499115b8fe552d83a6aa56d8b9 Gerrit-Change-Number: 917920 Gerrit-PatchSet: 1 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