[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Add Sphinx docstring to CaptchaProtectedResource.render_GET().



commit 16d084e4392f9f845452c58dfaa9138ff4c3bd28
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Tue Jan 28 17:24:51 2014 +0000

    Add Sphinx docstring to CaptchaProtectedResource.render_GET().
---
 lib/bridgedb/HTTPServer.py |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 5794be7..ddac918 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -123,8 +123,16 @@ class CaptchaProtectedResource(twisted.web.resource.Resource):
         return ip
 
     def render_GET(self, request):
-        # get a captcha
+        """Retrieve a ReCaptcha from the API server and serve it to the client.
+
+        :type request: :api:`twisted.web.http.Request`
+        :param request: A ``Request`` object for 'bridges.html'.
+        :rtype: str
+        :returns: A rendered HTML page containing a ReCaptcha challenge image
+                  for the client to solve.
+        """
         c = Raptcha(self.recaptchaPubKey, self.recaptchaPrivKey)
+
         try:
             c.get()
         except Exception as error:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits