[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Pep8; move ReCaptchaKeyError to the beginning of captcha.py.
commit 624e60cda89faa6cd6e032feba59078478b50169
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Fri Feb 28 23:38:55 2014 +0000
Pep8; move ReCaptchaKeyError to the beginning of captcha.py.
---
lib/bridgedb/captcha.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/bridgedb/captcha.py b/lib/bridgedb/captcha.py
index 430643c..67b23d3 100644
--- a/lib/bridgedb/captcha.py
+++ b/lib/bridgedb/captcha.py
@@ -38,6 +38,13 @@ from BeautifulSoup import BeautifulSoup
from recaptcha.client import captcha as recaptcha
+class ReCaptchaKeyError(Exception):
+ """Exception raised when recaptcha API keys are not supplied"""
+
+ def __init__(self):
+ msg = 'You must supply recaptcha API keys'
+ Exception.__init__(self, msg)
+
class ReCaptcha(object):
""" A recaptcha captcha and method to request them """
@@ -62,8 +69,3 @@ class ReCaptcha(object):
self.challenge = str(soup.find('input', {'name' : 'recaptcha_challenge_field'})['value'])
self.image = urllib2.urlopen(imgurl).read()
-class ReCaptchaKeyError(Exception):
- """ Exception raised when recaptcha API keys are not supplied"""
- def __init__(self):
- msg = 'You must supply recaptcha API keys'
- Exception.__init__(self, msg)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits