Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/285149

Change subject: [WIP] raise ServerError for request.status 104
......................................................................

[WIP] raise ServerError for request.status 104

Change-Id: Ie327b6598e332a2d4daf13a7e43b0d02c14d611f
---
M pywikibot/site_detect.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/49/285149/1

diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index a6a3003..444b80b 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')
+        if r.status == 104:
+            raise ServerError('Connection reset by peer')
 
         if fromurl != r.data.url:
             pywikibot.log('{0} redirected to {1}'.format(fromurl, r.data.url))

-- 
To view, visit https://gerrit.wikimedia.org/r/285149
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie327b6598e332a2d4daf13a7e43b0d02c14d611f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: nexqt
Gerrit-Owner: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to