core/desktop: don't crash if gi exists but is empty (#314)
Many packages install something into gi/overrides. If the gobject package itself is not installed, the import of gi succeeds but require_version is not contained within, resulting in an AttributeError.
This commit is contained in:
parent
1db757a2e2
commit
c6f9202380
@ -57,7 +57,7 @@ try:
|
||||
|
||||
gi.require_version('Notify', '0.7')
|
||||
from gi.repository import Notify
|
||||
except (ImportError, ValueError):
|
||||
except (ImportError, ValueError, AttributeError):
|
||||
pass
|
||||
else:
|
||||
if not Notify.init("i3pystatus"):
|
||||
|
Loading…
Reference in New Issue
Block a user