[fix] Moving default Geonames DB path to a shared module

This commit is contained in:
Al
2015-06-15 12:53:00 -04:00
parent 7a4fa7d443
commit 73f37fe66b
2 changed files with 10 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ this_dir = os.path.realpath(os.path.dirname(__file__))
sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))
from geodata.encoding import safe_decode
from geodata.geonames.paths import *
from geodata.file_utils import *
from geodata.log import *
@@ -27,12 +28,6 @@ from itertools import islice, chain
log_to_file(sys.stderr)
logger = logging.getLogger('geonames.sqlite')
GEONAMES_DB_NAME = 'geonames.db'
DEFAULT_GEONAMES_DB_PATH = os.path.join(this_dir, os.path.pardir,
os.path.pardir, os.path.pardir,
'data', 'geonames', GEONAMES_DB_NAME)
BASE_URL = 'http://download.geonames.org/export/'
DUMP_URL = urlparse.urljoin(BASE_URL, 'dump/')