Skip to content
Snippets Groups Projects
Commit 24d89658 authored by André's avatar André
Browse files

Location: Catch all GLib errors

Traceback (most recent call last):
  File "/home/user/gajim/gajim/common/dbus/location.py", line 63, in _on_simple_ready
    self.simple = Geoclue.Simple.new_finish(result)
gi.repository.GLib.Error: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.GeoClue2: Unit geoclue.service is masked.
parent 89361f61
No related branches found
No related tags found
No related merge requests found
......@@ -62,10 +62,7 @@ def _on_simple_ready(self, _obj, result):
try:
self.simple = Geoclue.Simple.new_finish(result)
except GLib.Error as error:
if error.domain == 'g-dbus-error-quark':
log.warning("Could not enable geolocation: %s", error.message)
else:
raise
log.warning("Could not enable geolocation: %s", error.message)
else:
self.simple.connect('notify::location', self._on_location_update)
self._on_location_update(self.simple)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment