[tor-commits] [bridgedb/master] Update docstring for bridgedb.captcha.GimpCaptcha.get().

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


commit 37e23ff0e786e293c1b2cc5a25fa27b0ada0a628
Author: Isis Lovecruft <isis at torproject.org>
Date:   Tue Mar 11 21:00:03 2014 +0000

    Update docstring for bridgedb.captcha.GimpCaptcha.get().
---
 lib/bridgedb/captcha.py |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/bridgedb/captcha.py b/lib/bridgedb/captcha.py
index 73ed70f..b4b0485 100644
--- a/lib/bridgedb/captcha.py
+++ b/lib/bridgedb/captcha.py
@@ -229,10 +229,15 @@ class GimpCaptcha(Captcha):
     def get(self):
         """Get a random CAPTCHA from the cache directory.
 
+        This chooses a random CAPTCHA image file from the cache directory, and
+        reads the contents of the image into a string. Next, it creates a
+        challenge string for the CAPTCHA, via :meth:`createChallenge`.
+
         :raises GimpCaptchaError: if the chosen CAPTCHA image file could not
-                                  be read.
-        :returns: A 2-tuple of ``(captcha, None)``, where ``captcha`` is the
-                  image file contents.
+            be read, or if the **cacheDir** is empty.
+        :rtype: tuple
+        :returns: A 2-tuple containing the image file contents as a string,
+            and a challenge string (used for checking the client's solution).
         """
         try:
             imageFilename = random.choice(os.listdir(self.cacheDir))





More information about the tor-commits mailing list