Commit a359b069 authored by Yann Leboulanger's avatar Yann Leboulanger

[Dicson] try to run geoclue service id it's not running. Fixes #5715

parent 9081b465
......@@ -38,19 +38,22 @@ class LocationListener:
def get_data(self):
bus = dbus.SessionBus()
if 'org.freedesktop.Geoclue.Master' not in bus.list_names():
try:
# Initializes Geoclue.
obj = bus.get_object('org.freedesktop.Geoclue.Master',
'/org/freedesktop/Geoclue/Master')
# get MasterClient path
path = obj.Create()
# get MasterClient
cli = bus.get_object('org.freedesktop.Geoclue.Master', path)
cli.SetRequirements(1, 0, True, 1023)
self._get_address(cli)
self._get_position(cli)
except:
self._on_geoclue_position_changed()
return
obj = bus.get_object('org.freedesktop.Geoclue.Master',
'/org/freedesktop/Geoclue/Master')
# get MasterClient path
path = obj.Create()
# get MasterClient
cli = bus.get_object('org.freedesktop.Geoclue.Master', path)
cli.SetRequirements(1, 0, True, 1023)
self._get_address(cli)
self._get_position(cli)
def _get_address(self, cli):
bus = dbus.SessionBus()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment