location_listener: location update notifier requires three parameters

the third parameter contains the location parameter specification
This commit is contained in:
André Apitzsch 2018-01-19 01:50:11 +01:00
parent 1605b722b7
commit c473fa6110
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ class LocationListener:
def __init__(self):
self._data = {}
def _on_location_update(self, simple):
# Note: do not remove third parameter `paramSpec`
# because notify signal expects three parameters
def _on_location_update(self, simple, paramSpec=None):
location = simple.get_location()
timestamp = location.get_property("timestamp")[0]
lat = location.get_property("latitude")