exc: in RequiredToolNotFound.get_package(), just call the new get_package_provider()

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent e62306e1
......@@ -23,8 +23,7 @@ try:
except ImportError:
distro = None
from .tools import get_current_os
from .external_tools import EXTERNAL_TOOLS
from .tools import get_package_provider
class OutputParsingError(Exception):
......@@ -37,12 +36,7 @@ class RequiredToolNotFound(Exception):
self.command = command
def get_package(self):
providers = EXTERNAL_TOOLS[self.command]
except KeyError: # noqa
return None
return providers.get(get_current_os(), None)
return get_package_provider(self.command)
class ContainerExtractionError(Exception):
def __init__(self, pathname, wrapped_exc):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment