Fix line length meet PEP8

This commit is contained in:
Alex White 2015-04-21 16:24:01 -07:00
parent b583f6f54f
commit 319027c1e6
2 changed files with 4 additions and 2 deletions

View file

@ -15,7 +15,8 @@ MOCK_REDIS = get_setting('DEFENDER_MOCK_REDIS', False)
# see if the user has overridden the failure limit
FAILURE_LIMIT = get_setting('DEFENDER_LOGIN_FAILURE_LIMIT', 3)
LOCKOUT_BY_IP_USERNAME = get_setting('DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME', False)
LOCKOUT_BY_IP_USERNAME = get_setting(
'DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME', False)
# use a specific username field to retrieve from login POST data
USERNAME_FORM_FIELD = get_setting('DEFENDER_USERNAME_FORM_FIELD', 'username')

View file

@ -253,7 +253,8 @@ def is_already_locked(request):
if config.LOCKOUT_BY_IP_USERNAME:
LOG.info("Block by ip & username")
if ip_blocked and user_blocked:
# if both this IP and this username are present the reqeust is blocked
# if both this IP and this username are present the request is
# blocked
return True
else: