From 9ed0a806797bfe48ed6cc47f9384a9e5355b6705 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 23 Feb 2009 10:22:55 +0000 Subject: [PATCH] Catch exceptions while loading the geoip db --- deluge/core/core.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index 9cec18618..104194897 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -87,7 +87,12 @@ class Core(component.Component): # Load the GeoIP DB for country look-ups if available geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat")) if os.path.exists(geoip_db): - self.session.load_country_db(geoip_db) + try: + self.session.load_country_db(geoip_db) + except Exception, e: + log.error("Unable to load geoip database!") + log.exception(e) + # Set the user agent self.settings = lt.session_settings()