[Dicson] try to run geoclue service id it's not running. Fixes #5715
This commit is contained in:
parent
9081b465ed
commit
a359b06912
1 changed files with 14 additions and 11 deletions
|
@ -38,9 +38,8 @@ class LocationListener:
|
||||||
|
|
||||||
def get_data(self):
|
def get_data(self):
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
if 'org.freedesktop.Geoclue.Master' not in bus.list_names():
|
try:
|
||||||
self._on_geoclue_position_changed()
|
# Initializes Geoclue.
|
||||||
return
|
|
||||||
obj = bus.get_object('org.freedesktop.Geoclue.Master',
|
obj = bus.get_object('org.freedesktop.Geoclue.Master',
|
||||||
'/org/freedesktop/Geoclue/Master')
|
'/org/freedesktop/Geoclue/Master')
|
||||||
# get MasterClient path
|
# get MasterClient path
|
||||||
|
@ -51,6 +50,10 @@ class LocationListener:
|
||||||
|
|
||||||
self._get_address(cli)
|
self._get_address(cli)
|
||||||
self._get_position(cli)
|
self._get_position(cli)
|
||||||
|
except:
|
||||||
|
self._on_geoclue_position_changed()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def _get_address(self, cli):
|
def _get_address(self, cli):
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
|
|
Loading…
Add table
Reference in a new issue