hamsclientfork 0.2.9__tar.gz → 0.2.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hamsclientfork-0.2.9/hamsclientfork.egg-info → hamsclientfork-0.2.10}/PKG-INFO +1 -1
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork/client.py +4 -2
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10/hamsclientfork.egg-info}/PKG-INFO +1 -1
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/setup.py +1 -1
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/.gitignore +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/LICENSE +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/README.md +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/README.rst +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork/__init__.py +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork/__main__.py +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork/py.typed +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/SOURCES.txt +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/dependency_links.txt +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/requires.txt +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/top_level.txt +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/setup.cfg +0 -0
- {hamsclientfork-0.2.9 → hamsclientfork-0.2.10}/tox.ini +0 -0
|
@@ -325,9 +325,11 @@ class meteoSwissClient:
|
|
|
325
325
|
_LOGGER.warning("Unable to find station name for : %s" % (stationId))
|
|
326
326
|
return None
|
|
327
327
|
|
|
328
|
-
def getGeoData(self, lat, lon):
|
|
328
|
+
def getGeoData(self, lat, lon, user_agent=None):
|
|
329
329
|
s = requests.Session()
|
|
330
330
|
s.headers.update(_HEADERS)
|
|
331
|
+
if user_agent:
|
|
332
|
+
s.headers.update({"User-Agent": user_agent})
|
|
331
333
|
|
|
332
334
|
uri = (
|
|
333
335
|
"https://nominatim.openstreetmap.org/reverse"
|
|
@@ -337,7 +339,7 @@ class meteoSwissClient:
|
|
|
337
339
|
geoData_req = s.get(uri)
|
|
338
340
|
try:
|
|
339
341
|
geoData_req.raise_for_status()
|
|
340
|
-
geoData = geoData_req.json
|
|
342
|
+
geoData = geoData_req.json()
|
|
341
343
|
_LOGGER.debug("Got data from OpenStreetMap: %s" % (geoData))
|
|
342
344
|
return geoData
|
|
343
345
|
except Exception:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|