[tor-commits] [bridgedb/master] Rearrange logging calls during pygeoip import in HTTPServer.py.
isis at torproject.org
isis at torproject.org
Wed Mar 26 05:49:32 UTC 2014
commit e2044209095f1a00ae65c998dc93f64796dd9e6e
Author: Isis Lovecruft <isis at torproject.org>
Date: Mon Mar 17 22:56:51 2014 +0000
Rearrange logging calls during pygeoip import in HTTPServer.py.
---
lib/bridgedb/HTTPServer.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 2744193..96ee029 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -72,12 +72,10 @@ try:
# geoip-database packages.
import pygeoip
geoip = pygeoip.GeoIP(_geoipdb, flags=pygeoip.MEMORY_CACHE)
+ logging.info("GeoIP database loaded")
except Exception as err:
- logging.debug("Error while loading geoip module: %r" % err)
- logging.warn("GeoIP database not found")
+ logging.warn("Error while loading geoip module: %r" % err)
geoip = None
-else:
- logging.info("GeoIP database loaded")
def replaceErrorPage(error, template_name=None):
More information about the tor-commits
mailing list