[tor-commits] [bridgedb/master] Rewrite docstring for bridgedb.captcha.ReCaptcha.get().

isis at torproject.org isis at torproject.org
Sun Mar 16 19:04:57 UTC 2014


commit 88d09044dd718d0b9ac706a095f252e8e8f4b44a
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Mar 1 03:17:06 2014 +0000

    Rewrite docstring for bridgedb.captcha.ReCaptcha.get().
---
 lib/bridgedb/captcha.py |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/captcha.py b/lib/bridgedb/captcha.py
index cd53cd7..fea4b44 100644
--- a/lib/bridgedb/captcha.py
+++ b/lib/bridgedb/captcha.py
@@ -74,8 +74,14 @@ class ReCaptcha(Captcha):
         super(ReCaptcha, self).__init__()
 
     def get(self):
-        """ gets a fresh captcha """
-
+        """Retrieve a CAPTCHA from the reCaptcha API server.
+
+        This simply requests a new CAPTCHA from
+        ``recaptcha.client.captcha.API_SSL_SERVER`` and parses the returned
+        HTML to extract the CAPTCHA image and challenge string. The image is
+        stored at ``ReCaptcha.image`` and the challenge string at
+        ``ReCaptcha.challenge``.
+        """
         if (self.pubkey == '') or (self.privkey == ''):
             raise ReCaptchaKeyError
         urlbase = recaptcha.API_SERVER





More information about the tor-commits mailing list