mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-02 06:36:15 +00:00
Fallback to using DNS for geoip lookups if the database file is not
available
This commit is contained in:
parent
4eedc1b23e
commit
66ae89122d
@ -165,9 +165,10 @@ class Core(
|
||||
# Load the session state if available
|
||||
self.load_session_state()
|
||||
|
||||
# Load the GeoIP DB for country look-ups
|
||||
self.session.load_country_db(
|
||||
pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat")))
|
||||
# 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)
|
||||
|
||||
# Set the user agent
|
||||
self.settings = lt.session_settings()
|
||||
|
2
setup.py
2
setup.py
@ -344,7 +344,7 @@ setup(
|
||||
author = "Andrew Resch, Marcos Pinto, Martijn Voncken, Sadrul Habib Chowdhury",
|
||||
author_email = "andrewresch@gmail.com, markybob@dipconsultants.com, \
|
||||
mvoncken@gmail.com, sadrul@users.sourceforge.net",
|
||||
cmdclass=cmdclass,
|
||||
cmdclass = cmdclass,
|
||||
data_files = _data_files,
|
||||
description = "Bittorrent Client",
|
||||
entry_points = """
|
||||
|
Loading…
x
Reference in New Issue
Block a user