Commit cb4d253fe6ead8e0b73938f3903820f0c13497ca
1 parent
e93def59
Exists in
master
fix: continue battling with TLS
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
flaskr/geocoder.py
... | ... | @@ -8,14 +8,14 @@ import geopy.geocoders |
8 | 8 | |
9 | 9 | from flaskr.core import get_path |
10 | 10 | |
11 | -ctx = ssl.create_default_context(cafile=certifi.where()) | |
12 | -geopy.geocoders.options.default_ssl_context = ctx | |
11 | +ssl_ctx = ssl.create_default_context(cafile=certifi.where()) | |
12 | +geopy.geocoders.options.default_ssl_context = ssl_ctx | |
13 | 13 | |
14 | 14 | |
15 | 15 | class CachedGeocoder: |
16 | 16 | |
17 | 17 | def __init__(self, source="Nominatim", geocache="geocache.db"): |
18 | - self.geocoder = getattr(geopy.geocoders, source)(scheme='http') | |
18 | + self.geocoder = getattr(geopy.geocoders, source)(scheme='https') | |
19 | 19 | self.cache = shelve.open(get_path(geocache), writeback=True) |
20 | 20 | # self.timestamp = time.time() + 1.5 |
21 | 21 | ... | ... |