From 68be70af24fd5096de987d6e565f5442530e8562 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Sat, 9 Nov 2013 15:32:25 +0000 Subject: [PATCH] Support Python2 ipaddr library. --- isso/utils/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/isso/utils/__init__.py b/isso/utils/__init__.py index de3be2b..4a6847d 100644 --- a/isso/utils/__init__.py +++ b/isso/utils/__init__.py @@ -14,7 +14,10 @@ from string import ascii_letters, digits from werkzeug.wrappers import Request from werkzeug.exceptions import BadRequest -import ipaddress +try: + import ipaddress +except ImportError: + import ipaddr as ipaddress def anonymize(remote_addr):