Support Python2 ipaddr library.

This commit is contained in:
Federico Ceratto 2013-11-09 15:32:25 +00:00
parent ac8d987392
commit 68be70af24

View File

@ -14,7 +14,10 @@ from string import ascii_letters, digits
from werkzeug.wrappers import Request
from werkzeug.exceptions import BadRequest
try:
import ipaddress
except ImportError:
import ipaddr as ipaddress
def anonymize(remote_addr):