summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2017-07-14 09:46:27 (GMT)
committerMattia Rizzolo <mattia@debian.org>2017-07-14 09:48:39 (GMT)
commitc12bee5fc718c918d6280102d4dbe688b0a553cf (patch)
treefa4cc791f3a9eb47a1dbb73a29e8ea1574b4bab1
parente62306e17e8a9b981d3b7f427bc99f8582a0301a (diff)
exc: in RequiredToolNotFound.get_package(), just call the new get_package_provider()
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
-rw-r--r--diffoscope/exc.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/diffoscope/exc.py b/diffoscope/exc.py
index 95fe791..a510b0e 100644
--- a/diffoscope/exc.py
+++ b/diffoscope/exc.py
@@ -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):
- try:
- 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):