X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/cec32849d48d9e36c030224e2eb9631d31ef17a2..b4cd9f878117f7398442acb09d40b520f321a91d:/philo/contrib/sobol/search.py?ds=inline diff --git a/philo/contrib/sobol/search.py b/philo/contrib/sobol/search.py index 39b93c7..6cd577d 100644 --- a/philo/contrib/sobol/search.py +++ b/philo/contrib/sobol/search.py @@ -1,4 +1,5 @@ #encoding: utf-8 +import datetime from django.conf import settings from django.contrib.sites.models import Site @@ -9,12 +10,16 @@ from django.utils.http import urlquote_plus from django.utils.safestring import mark_safe from django.utils.text import capfirst from django.template import loader, Context, Template -import datetime + from philo.contrib.sobol.utils import make_tracking_querydict -try: - from eventlet.green import urllib2 -except: + +if getattr(settings, 'SOBOL_USE_EVENTLET', False): + try: + from eventlet.green import urllib2 + except: + import urllib2 +else: import urllib2