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:
Matti Niemenmaa 2017-06-26 17:03:39 +03:00 committed by enkore
parent 1db757a2e2
commit c6f9202380

View File

@ -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"):