mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 15:10:05 +01:00
tests: fix "test-client.py" ignoring missing "NM" module
Fixes: 8959083784 ('tests: skip test in "test-client.py" if the pexepect dependency is not available')
This commit is contained in:
parent
90b267afa7
commit
f7e484c8ed
1 changed files with 7 additions and 3 deletions
|
|
@ -117,13 +117,17 @@ import gi
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
except ImportError as e:
|
except ImportError:
|
||||||
GLib = None
|
GLib = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gi.require_version("NM", "1.0")
|
gi.require_version("NM", "1.0")
|
||||||
|
except ValueError:
|
||||||
|
NM = None
|
||||||
|
else:
|
||||||
|
try:
|
||||||
from gi.repository import NM
|
from gi.repository import NM
|
||||||
except ImportError as e:
|
except ImportError:
|
||||||
NM = None
|
NM = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue