fix launch when optional modules are not installed
This commit is contained in:
parent
75b94ca864
commit
5c0fce9668
|
@ -211,7 +211,7 @@ try:
|
||||||
gi.require_version('GUPnPIgd', '1.0')
|
gi.require_version('GUPnPIgd', '1.0')
|
||||||
from gi.repository import GUPnPIgd
|
from gi.repository import GUPnPIgd
|
||||||
gupnp_igd = GUPnPIgd.SimpleIgd()
|
gupnp_igd = GUPnPIgd.SimpleIgd()
|
||||||
except ImportError:
|
except ValueError:
|
||||||
HAVE_UPNP_IGD = False
|
HAVE_UPNP_IGD = False
|
||||||
|
|
||||||
HAVE_PYCURL = True
|
HAVE_PYCURL = True
|
||||||
|
|
|
@ -258,7 +258,7 @@ def get_storage():
|
||||||
gir = __import__('gi.repository', globals(), locals(),
|
gir = __import__('gi.repository', globals(), locals(),
|
||||||
['Secret'], 0)
|
['Secret'], 0)
|
||||||
Secret = gir.Secret
|
Secret = gir.Secret
|
||||||
except (ImportError, AttributeError):
|
except (ValueError, AttributeError):
|
||||||
global GnomeKeyring
|
global GnomeKeyring
|
||||||
try:
|
try:
|
||||||
gir = __import__('gi.repository', globals(), locals(),
|
gir = __import__('gi.repository', globals(), locals(),
|
||||||
|
|
10
src/gajim.py
10
src/gajim.py
|
@ -134,11 +134,11 @@ import logging
|
||||||
# gajim.gui or gajim.gtk more appropriate ?
|
# gajim.gui or gajim.gtk more appropriate ?
|
||||||
log = logging.getLogger('gajim.gajim')
|
log = logging.getLogger('gajim.gajim')
|
||||||
|
|
||||||
#import gi
|
import gi
|
||||||
#gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
#gi.require_version('Gdk', '2.0')
|
gi.require_version('Gdk', '3.0')
|
||||||
#gi.require_version('GObject', '2.0')
|
gi.require_version('GObject', '2.0')
|
||||||
#gi.require_version('Pango', '1.0')
|
gi.require_version('Pango', '1.0')
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
from common import i18n
|
from common import i18n
|
||||||
|
|
|
@ -50,7 +50,7 @@ try:
|
||||||
gi.require_version('Notify', '0.7')
|
gi.require_version('Notify', '0.7')
|
||||||
from gi.repository import Notify
|
from gi.repository import Notify
|
||||||
Notify.init('Gajim Notification')
|
Notify.init('Gajim Notification')
|
||||||
except ImportError:
|
except ValueError:
|
||||||
USER_HAS_PYNOTIFY = False
|
USER_HAS_PYNOTIFY = False
|
||||||
|
|
||||||
def get_show_in_roster(event, account, contact, session=None):
|
def get_show_in_roster(event, account, contact, session=None):
|
||||||
|
|
Loading…
Reference in New Issue