Skip to content
Snippets Groups Projects
Commit bc97f6a9 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Guard GeoClue import

- So we dont have to check on module import if GeoClue is installed
parent b80afa71
No related branches found
No related tags found
No related merge requests found
......@@ -14,15 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime
import logging
from datetime import datetime
from gi.repository import GLib
from gajim.common import app
import gi
gi.require_version('Geoclue', '2.0')
from gi.repository import Geoclue
from gi.repository import GLib
log = logging.getLogger('gajim.c.dbus.location')
......@@ -102,5 +100,10 @@ class LocationListener:
def enable():
if not app.is_installed('GEOCLUE'):
log.warning('GeoClue not installed')
return
from gi.repository import Geoclue
listener = LocationListener.get()
listener.start()
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