jenkins-bot has submitted this change and it was merged.
Change subject: Retry connection for generic http 500 status error
......................................................................
Retry connection for generic http 500 status error
instead of breaking the script immediately
Change-Id: Ib7f1b8bf39bb64fd0b365a58c77302847e406207
---
M pywikibot/comms/http.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 3c265f4..ea70fc5 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -138,7 +138,7 @@
raise PageNotFound(
u'Page %s could not be retrieved. Check your virus wall.'
% url)
- elif e.code == 504:
+ elif e.code in [500, 502, 504]:
pywikibot.output(u'HTTPError: %s %s' % (e.code, e.msg))
if retry:
retry_attempt += 1
--
To view, visit https://gerrit.wikimedia.org/r/120002
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7f1b8bf39bb64fd0b365a58c77302847e406207
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits