mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
Catch exceptions while loading the geoip db
This commit is contained in:
parent
108a22f1b9
commit
d0c369fb58
1 changed files with 5 additions and 1 deletions
|
@ -173,7 +173,11 @@ class Core(
|
||||||
# Load the GeoIP DB for country look-ups if available
|
# Load the GeoIP DB for country look-ups if available
|
||||||
geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))
|
geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))
|
||||||
if os.path.exists(geoip_db):
|
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
|
# Set the user agent
|
||||||
self.settings = lt.session_settings()
|
self.settings = lt.session_settings()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue