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:
@@ -117,13 +117,17 @@ import gi
|
||||
|
||||
try:
|
||||
from gi.repository import GLib
|
||||
except ImportError as e:
|
||||
except ImportError:
|
||||
GLib = None
|
||||
|
||||
try:
|
||||
gi.require_version("NM", "1.0")
|
||||
except ValueError:
|
||||
NM = None
|
||||
else:
|
||||
try:
|
||||
from gi.repository import NM
|
||||
except ImportError as e:
|
||||
except ImportError:
|
||||
NM = None
|
||||
|
||||
try:
|
||||
|
Reference in New Issue
Block a user