summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2019-05-28 08:52:45 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2019-05-28 16:02:15 +0200
commitb7fc562c888f1c71c5b462c5cb612455625d838c (patch)
tree394a16f491c66d2d8f5741a4a611f1c3c800e909
parent1a825de020cb12aa3c17b23c46e7ae975ec3b977 (diff)
downloadpoezio-b7fc562c888f1c71c5b462c5cb612455625d838c.tar.gz
poezio-b7fc562c888f1c71c5b462c5cb612455625d838c.tar.bz2
poezio-b7fc562c888f1c71c5b462c5cb612455625d838c.tar.xz
poezio-b7fc562c888f1c71c5b462c5cb612455625d838c.zip
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.
-rw-r--r--poezio/windows/image.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/poezio/windows/image.py b/poezio/windows/image.py
index dfd2eae2..ebecb5ad 100644
--- a/poezio/windows/image.py
+++ b/poezio/windows/image.py
@@ -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