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
pywikibot-commits@lists.wikimedia.org