mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-09 04:48:05 +02:00
src/linux/integration-test: Fail gracefully if GI is not available
This commit is contained in:
parent
8fc9a1d750
commit
6bb3623d46
1 changed files with 6 additions and 2 deletions
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue