jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377282 )
Change subject: site_detect.py: Raise ServerError for 502 response status ......................................................................
site_detect.py: Raise ServerError for 502 response status
Bug: T175584 Change-Id: I1f2d5cb701f37c5e7e40db81b0849d9989485c2c --- M pywikibot/site_detect.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py index 347bd63..60048a6 100644 --- a/pywikibot/site_detect.py +++ b/pywikibot/site_detect.py @@ -305,6 +305,8 @@ """Raise ServerError if the response indicates a server error.""" if response.status == 503: raise ServerError('Service Unavailable') + elif response.status == 502: + raise ServerError('Bad Gateway') elif response.status == 500: raise ServerError('Internal Server Error') elif response.status == 200 and SERVER_DB_ERROR_MSG in response.content:
pywikibot-commits@lists.wikimedia.org