From f1be7bbd4a7df2ffed5ccbf204563a4cee1c82f9 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Thu, 5 Jun 2014 11:49:01 -0700 Subject: [PATCH] Optimize access on DISALLOWED_IPS --- src/sentry/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/http.py b/src/sentry/http.py index a9c282f6ad9b55..08cabc14903805 100644 --- a/src/sentry/http.py +++ b/src/sentry/http.py @@ -16,7 +16,7 @@ from urlparse import urlparse -DISALLOWED_IPS = map(IPNetwork, settings.SENTRY_DISALLOWED_IPS) +DISALLOWED_IPS = set((IPNetwork(i) for i in settings.SENTRY_DISALLOWED_IPS)) class NoRedirectionHandler(urllib2.HTTPErrorProcessor):