diff --git a/deluge/core/core.py b/deluge/core/core.py index 38fd9ac75..277178466 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -211,9 +211,10 @@ class Core( self.settings = lt.session_settings() self.settings.user_agent = "Deluge %s" % deluge.common.get_version() - # 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 session settings self.settings.lazy_bitfields = 1 diff --git a/setup.py b/setup.py index 02275b0ba..2814db932 100644 --- a/setup.py +++ b/setup.py @@ -345,7 +345,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 = """