Skip to content
Snippets Groups Projects
Verified Commit c12bee5f authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

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

parent e62306e1
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,7 @@ try: ...@@ -23,8 +23,7 @@ try:
except ImportError: except ImportError:
distro = None distro = None
from .tools import get_current_os from .tools import get_package_provider
from .external_tools import EXTERNAL_TOOLS
class OutputParsingError(Exception): class OutputParsingError(Exception):
...@@ -37,12 +36,7 @@ class RequiredToolNotFound(Exception): ...@@ -37,12 +36,7 @@ class RequiredToolNotFound(Exception):
self.command = command self.command = command
def get_package(self): def get_package(self):
try: return get_package_provider(self.command)
providers = EXTERNAL_TOOLS[self.command]
except KeyError: # noqa
return None
return providers.get(get_current_os(), None)
class ContainerExtractionError(Exception): class ContainerExtractionError(Exception):
def __init__(self, pathname, wrapped_exc): def __init__(self, pathname, wrapped_exc):
......
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