XZise has uploaded a new change for review.

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

Change subject: [FIX] Return exception instead of raising it
......................................................................

[FIX] Return exception instead of raising it

Instead of raising exceptions it should be returned so the data is set
to that exception.

Bug: T94993
Change-Id: I955f1c91ae2dc31e404f05ee776d4184882c76f2
---
M pywikibot/comms/threadedhttp.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/96/201696/1

diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py
index e3c0e64..7844894 100644
--- a/pywikibot/comms/threadedhttp.py
+++ b/pywikibot/comms/threadedhttp.py
@@ -306,7 +306,7 @@
                                 headers=headers,
                                 max_redirects=max_redirects - 1)
         else:
-            raise httplib2.RedirectLimit(
+            return httplib2.RedirectLimit(
                 "Redirected more times than redirection_limit allows.",
                 response, content)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I955f1c91ae2dc31e404f05ee776d4184882c76f2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>

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

Reply via email to