Commit 520f8c69 authored by Chris Lamb's avatar Chris Lamb 👀
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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.