Skip to content
Snippets Groups Projects
Commit 520f8c69 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Correct logic of module_exists, ensuring we correctly skip the debian.deb822...

Correct logic of module_exists, ensuring we correctly skip the debian.deb822 tests when python3-debian is not installed. (Closes: #854745)

Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
parent 90c33e7e
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ def get_supported_elf_formats():
def skip_unless_module_exists(name):
def module_exists(x):
try:
return importlib.util.find_spec(x) is None
return importlib.util.find_spec(x) is not None
except ImportError:
# Probing for submodules (eg. ``debian.deb822``) will attempt to
# import ``debian`` so we must handle that failing.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment