mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00: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
|
@ -117,14 +117,18 @@ import gi
|
|||
|
||||
try:
|
||||
from gi.repository import GLib
|
||||
except ImportError as e:
|
||||
except ImportError:
|
||||
GLib = None
|
||||
|
||||
try:
|
||||
gi.require_version("NM", "1.0")
|
||||
from gi.repository import NM
|
||||
except ImportError as e:
|
||||
except ValueError:
|
||||
NM = None
|
||||
else:
|
||||
try:
|
||||
from gi.repository import NM
|
||||
except ImportError:
|
||||
NM = None
|
||||
|
||||
try:
|
||||
import pexpect
|
||||
|
|
Loading…
Reference in a new issue