fix launch when optional modules are not installed

This commit is contained in:
Yann Leboulanger 2015-07-30 15:15:38 +02:00
parent 75b94ca864
commit 5c0fce9668
4 changed files with 8 additions and 8 deletions

View File

@ -211,7 +211,7 @@ try:
gi.require_version('GUPnPIgd', '1.0')
from gi.repository import GUPnPIgd
gupnp_igd = GUPnPIgd.SimpleIgd()
except ImportError:
except ValueError:
HAVE_UPNP_IGD = False
HAVE_PYCURL = True

View File

@ -258,7 +258,7 @@ def get_storage():
gir = __import__('gi.repository', globals(), locals(),
['Secret'], 0)
Secret = gir.Secret
except (ImportError, AttributeError):
except (ValueError, AttributeError):
global GnomeKeyring
try:
gir = __import__('gi.repository', globals(), locals(),

View File

@ -134,11 +134,11 @@ import logging
# gajim.gui or gajim.gtk more appropriate ?
log = logging.getLogger('gajim.gajim')
#import gi
#gi.require_version('Gtk', '3.0')
#gi.require_version('Gdk', '2.0')
#gi.require_version('GObject', '2.0')
#gi.require_version('Pango', '1.0')
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
gi.require_version('GObject', '2.0')
gi.require_version('Pango', '1.0')
import getopt
from common import i18n

View File

@ -50,7 +50,7 @@ try:
gi.require_version('Notify', '0.7')
from gi.repository import Notify
Notify.init('Gajim Notification')
except ImportError:
except ValueError:
USER_HAS_PYNOTIFY = False
def get_show_in_roster(event, account, contact, session=None):