diff options
author | Thomas Haller <thaller@redhat.com> | 2022-08-26 00:00:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-08-26 00:00:14 +0200 |
commit | 9902373c6d984f3a72a6dc5f0b6ea1cf3a09f18d (patch) | |
tree | 2c9708210edbb27bbf20bbf011570082aed12f04 | |
parent | befbad7375c2c1f4b45d4427cf257abf5d805d40 (diff) | |
download | NetworkManager-9902373c6d984f3a72a6dc5f0b6ea1cf3a09f18d.tar.gz |
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: f7e484c8eda4 ('tests: fix "test-client.py" ignoring missing "NM" module')
-rwxr-xr-x | src/tests/client/test-client.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tests/client/test-client.py b/src/tests/client/test-client.py index 68cc08e86d..85a09ad25c 100755 --- a/src/tests/client/test-client.py +++ b/src/tests/client/test-client.py @@ -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 |