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
...@@ -62,10 +62,7 @@ def _on_simple_ready(self, _obj, result): ...@@ -62,10 +62,7 @@ def _on_simple_ready(self, _obj, result):
try: try:
self.simple = Geoclue.Simple.new_finish(result) self.simple = Geoclue.Simple.new_finish(result)
except GLib.Error as error: except GLib.Error as error:
if error.domain == 'g-dbus-error-quark': log.warning("Could not enable geolocation: %s", error.message)
log.warning("Could not enable geolocation: %s", error.message)
else:
raise
else: else:
self.simple.connect('notify::location', self._on_location_update) self.simple.connect('notify::location', self._on_location_update)
self._on_location_update(self.simple) self._on_location_update(self.simple)
......
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