formatting

This commit is contained in:
Kegan Dougal 2014-09-19 12:04:17 +01:00
parent 008515c844
commit 3fa01be9e4

View file

@ -14,13 +14,16 @@
from ._base import Config from ._base import Config
class CaptchaConfig(Config): class CaptchaConfig(Config):
def __init__(self, args): def __init__(self, args):
super(CaptchaConfig, self).__init__(args) super(CaptchaConfig, self).__init__(args)
self.recaptcha_private_key = args.recaptcha_private_key self.recaptcha_private_key = args.recaptcha_private_key
self.enable_registration_captcha = args.enable_registration_captcha self.enable_registration_captcha = args.enable_registration_captcha
self.captcha_ip_origin_is_x_forwarded = args.captcha_ip_origin_is_x_forwarded self.captcha_ip_origin_is_x_forwarded = (
args.captcha_ip_origin_is_x_forwarded
)
@classmethod @classmethod
def add_arguments(cls, parser): def add_arguments(cls, parser):
@ -32,11 +35,12 @@ class CaptchaConfig(Config):
) )
group.add_argument( group.add_argument(
"--enable-registration-captcha", type=bool, default=False, "--enable-registration-captcha", type=bool, default=False,
help="Enables ReCaptcha checks when registering, preventing signup "+ help="Enables ReCaptcha checks when registering, preventing signup"
"unless a captcha is answered. Requires a valid ReCaptcha public/private key." + " unless a captcha is answered. Requires a valid ReCaptcha "
+ "public/private key."
) )
group.add_argument( group.add_argument(
"--captcha_ip_origin_is_x_forwarded", type=bool, default=False, "--captcha_ip_origin_is_x_forwarded", type=bool, default=False,
help="When checking captchas, use the X-Forwarded-For (XFF) header as the client IP "+ help="When checking captchas, use the X-Forwarded-For (XFF) header"
"and not the actual client IP." + " as the client IP and not the actual client IP."
) )