Logging geocode response

This commit is contained in:
Fabio Manganiello 2018-05-22 21:34:06 +00:00
parent f4da6ebb1b
commit 2c7880874d
1 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import json
import logging
import requests
from platypush.message.response import Response
@ -29,6 +30,8 @@ class GoogleMapsPlugin(GooglePlugin):
if 'results' in response and response['results']:
result = response['results'][0]
logging.info('Google Maps geocode response for latlng ({},{}): {}'.
format(latitude, longitude, result))
for addr_component in result['address_components']:
for component_type in addr_component['types']: