Dalba has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326313 )
Change subject: site_detect.py: Raise ServerError on 500 response ...................................................................... site_detect.py: Raise ServerError on 500 response A test for wikichristian.org is occasionally returning 500 error codes and making travis builds fail. Raising a ServerError here will make that test to skip. Bug: T151368 Change-Id: I9e0c5d64c28f8d4baf860541ad518c4ae861177d --- M pywikibot/site_detect.py 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/13/326313/1 diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py index cc69e4b..4eb78d7 100644 --- a/pywikibot/site_detect.py +++ b/pywikibot/site_detect.py @@ -54,6 +54,8 @@ r = fetch(fromurl) if r.status == 503: raise ServerError('Service Unavailable') + elif r.status == 500: + raise ServerError('Internal Server Error') if fromurl != r.data.url: pywikibot.log('{0} redirected to {1}'.format(fromurl, r.data.url)) -- To view, visit https://gerrit.wikimedia.org/r/326313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e0c5d64c28f8d4baf860541ad518c4ae861177d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Dalba <dalba.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits