Also skip librsvg import on AttributeError

In the case python-gobject isn’t installed, but another package (such as
libibus) provides overrides, the gi module will still get imported fine
despite being empty, resulting in a traceback. To prevent this, we also
catch AttributeError so that gi.require_version can fail.
This commit is contained in:
Emmanuel Gil Peyrot 2019-05-28 08:52:45 +02:00
parent 1a825de020
commit b7fc562c88

View file

@ -20,7 +20,7 @@ try:
from gi.repository import Rsvg
import cairo
HAS_RSVG = True
except (ImportError, ValueError):
except (ImportError, ValueError, AttributeError):
HAS_RSVG = False
from poezio.windows.base_wins import Win