We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 302029d commit 33a10a9Copy full SHA for 33a10a9
1 file changed
eduvpn/main.py
@@ -4,17 +4,20 @@
4
# SPDX-License-Identifier: GPL-3.0+
5
6
import logging
7
-import dbus.mainloop.glib
8
import gi
9
gi.require_version('Gtk', '3.0')
10
from gi.repository import GObject, Gtk, GLib
+from eduvpn.util import have_dbus
11
12
13
def main():
14
format_ = '%(asctime)s - %(levelname)s - %(name)s - %(message)s'
15
logging.basicConfig(level=logging.INFO, format=format_)
16
GObject.threads_init()
17
- dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
18
+ if have_dbus():
19
+ import dbus.mainloop.glib
20
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
21
22
# import this later so the logging is properly configured
23
from eduvpn.ui import EduVpnApp
0 commit comments