зеркало из https://github.com/mozilla/commonware.git
PEP8 and Pyflakes cleanup.
This commit is contained in:
Родитель
c1dd1bf9c0
Коммит
c8b94e0067
|
@ -21,14 +21,3 @@ class ScrubRequestOnException(object):
|
||||||
# Clearing out all cookies in request.META. They will already
|
# Clearing out all cookies in request.META. They will already
|
||||||
# be sent with request.COOKIES.
|
# be sent with request.COOKIES.
|
||||||
request.META['HTTP_COOKIE'] = '******'
|
request.META['HTTP_COOKIE'] = '******'
|
||||||
|
|
||||||
|
|
||||||
class HidePasswordOnException(ScrubRequestOnException):
|
|
||||||
def __init__(self):
|
|
||||||
import warnings
|
|
||||||
warnings.warn(
|
|
||||||
"The middleware at `commonware.middleware.HidePasswordOnException` "
|
|
||||||
"is deprecated; use `commonware.middleware.ScrubRequestOnException` "
|
|
||||||
"instead.",
|
|
||||||
DeprecationWarning
|
|
||||||
)
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ from django.conf import settings
|
||||||
|
|
||||||
TYPES = (socket.AF_INET, socket.AF_INET6)
|
TYPES = (socket.AF_INET, socket.AF_INET6)
|
||||||
|
|
||||||
|
|
||||||
def is_valid(ip):
|
def is_valid(ip):
|
||||||
for af in TYPES:
|
for af in TYPES:
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from mock import patch
|
from mock import patch
|
||||||
from nose.tools import eq_
|
|
||||||
|
|
||||||
from commonware.response.cookies.monkeypatch import patch_all
|
from commonware.response.cookies.monkeypatch import patch_all
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче