Fixes AttributeError while importing `gi` (#177)

pull/178/head
Senan Kelly 2019-11-22 18:54:07 +00:00 committed by Chris Caron
parent 3b19f43244
commit cc8fae4c73
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ try:
from gi.repository import GdkPixbuf
NOTIFY_DBUS_IMAGE_SUPPORT = True
except (ImportError, ValueError):
except (ImportError, ValueError, AttributeError):
# No problem; this will get caught in outer try/catch
# A ValueError will get thrown upon calling gi.require_version() if

View File

@ -49,7 +49,7 @@ try:
# We're good to go!
NOTIFY_GNOME_SUPPORT_ENABLED = True
except (ImportError, ValueError):
except (ImportError, ValueError, AttributeError):
# No problem; we just simply can't support this plugin; we could
# be in microsoft windows, or we just don't have the python-gobject
# library available to us (or maybe one we don't support)?