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

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



commit 88d09044dd718d0b9ac706a095f252e8e8f4b44a
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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



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