[tor-commits] [bridgedb/master] Tweak docstrings for two ReCaptchaProtectedResource methods.

isis at torproject.org isis at torproject.org
Fri May 16 18:52:53 UTC 2014


commit 91ec2eb2cc79f2f932fa2557bb0fe455bf9af24c
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed May 14 20:10:36 2014 +0000

    Tweak docstrings for two ReCaptchaProtectedResource methods.
    
     * CHANGE getRemoteIP() and checkSolution() docstring to make the Sphinx
       output be formatted more nicely.
---
 lib/bridgedb/HTTPServer.py |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 491e527..3b77c39 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -458,8 +458,8 @@ class ReCaptchaProtectedResource(CaptchaProtectedResource):
         """Mask the client's real IP address with a faked one.
 
         The fake client IP address is sent to the reCaptcha server, and it is
-        either the public IP address of bridges.torproject.org (if
-        ``RECAPTCHA_REMOTE_IP`` is configured), or a random IP.
+        either the public IP address of bridges.torproject.org (if the config
+        option ``RECAPTCHA_REMOTE_IP`` is configured), or a random IP.
 
         :rtype: str
         :returns: A fake IP address to report to the reCaptcha API server.
@@ -485,10 +485,13 @@ class ReCaptchaProtectedResource(CaptchaProtectedResource):
             ``'captcha_response_field'``. These POST arguments should be
             obtained from :meth:`render_GET`.
         :rtupe: :api:`twisted.internet.defer.Deferred`
-        :returns: the returned deferred will callback with a tuple of
-                (``bool``, :api:`twisted.web.server.Request`). If the CAPTCHA
-            solution was valid, a tuple will contain ``(True, request)``;
-            otherwise, it will contain ``(False, request)``.
+        :returns: A deferred wich will callback with a tuple in the following
+            form:
+                (:type:`bool`, :api:`twisted.web.server.Request`)
+            If the CAPTCHA solution was valid, a tuple will contain::
+                (True, Request)
+            Otherwise, it will contain::
+                (False, Request)
         """
         challenge, response = self.extractClientSolution(request)
         clientIP = self.getClientIP(request)





More information about the tor-commits mailing list