src/linux/integration-test: Fail gracefully if GI is not available

This commit is contained in:
Martin Pitt 2011-12-05 10:44:35 +01:00
parent 8fc9a1d750
commit 6bb3623d46

View file

@ -25,8 +25,12 @@ import unittest
import shutil
import time
from gi.repository import GLib
from gi.repository import Gio
try:
from gi.repository import GLib
from gi.repository import Gio
except ImportError as e:
sys.stderr.write('Skipping tests, PyGobject not available for Python 3, or missing GI typelibs: %s\n' % str(e))
sys.exit(0)
UP = 'org.freedesktop.UPower'