mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 23:00:07 +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') (cherry picked from commit9902373c6d)
This commit is contained in:
parent
d6d76f900f
commit
36ad9855d1
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