From 6fb952397573f4bc90f4cd9e72b49fcf6256e95c Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 17 Jan 2013 08:07:45 +0900 Subject: localize exit country if we can only if we can find the geoip database, which comes with geoip-database in debian. we will have to think more about this in the future but it's nice to have now for testing. --- src/leap/util/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/leap/util/__init__.py') diff --git a/src/leap/util/__init__.py b/src/leap/util/__init__.py index e69de29b..a70a9a8b 100644 --- a/src/leap/util/__init__.py +++ b/src/leap/util/__init__.py @@ -0,0 +1,9 @@ +import logging +logger = logging.getLogger(__name__) + +try: + import pygeoip + HAS_GEOIP = True +except ImportError: + logger.debug('PyGeoIP not found. Disabled Geo support.') + HAS_GEOIP = False -- cgit v1.2.3