mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
tests: fix "test-client.py" for early python3 versions
ModuleNotFoundError was only introduced in later python 3 versions.
Use just "ImportError", which is the parent class anyway.
Fixes: f7e484c8ed ('tests: fix "test-client.py" ignoring missing "NM" module')
This commit is contained in:
parent
befbad7375
commit
9902373c6d
1 changed files with 1 additions and 3 deletions
|
|
@ -111,8 +111,6 @@ import dbus.service
|
|||
import dbus.mainloop.glib
|
||||
import io
|
||||
|
||||
moduleNotFoundError = ModuleNotFoundError if sys.version_info[0] >= 3 else ImportError
|
||||
|
||||
import gi
|
||||
|
||||
try:
|
||||
|
|
@ -132,7 +130,7 @@ else:
|
|||
|
||||
try:
|
||||
import pexpect
|
||||
except moduleNotFoundError:
|
||||
except ImportError:
|
||||
pexpect = None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue