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:
@@ -111,8 +111,6 @@ import dbus.service
|
|||||||
import dbus.mainloop.glib
|
import dbus.mainloop.glib
|
||||||
import io
|
import io
|
||||||
|
|
||||||
moduleNotFoundError = ModuleNotFoundError if sys.version_info[0] >= 3 else ImportError
|
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -132,7 +130,7 @@ else:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import pexpect
|
import pexpect
|
||||||
except moduleNotFoundError:
|
except ImportError:
|
||||||
pexpect = None
|
pexpect = None
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user