Commit 1bc69cff8e8db0e4d9e1bb2df58dca91bfe1c9fc

Authored by Antoine Goutenoir
1 parent edbfd01a
Exists in master

fix: use HTTP, not HTTPS, or certifs fail

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
flaskr/geocoder.py
1   -import geopy
2 1 import shelve
3 2 import time
4 3  
  4 +import geopy
  5 +
5 6 from flaskr.core import get_path
6 7  
7 8  
8 9 class CachedGeocoder:
9 10  
10 11 def __init__(self, source="Nominatim", geocache="geocache.db"):
11   - self.geocoder = getattr(geopy.geocoders, source)()
  12 + self.geocoder = getattr(geopy.geocoders, source)(scheme='http')
12 13 self.cache = shelve.open(get_path(geocache), writeback=True)
13 14 # self.timestamp = time.time() + 1.5
14 15  
... ...