[diffoscope] 03/03: exc: in RequiredToolNotFound.get_package(), just call the new get_package_provider()
Mattia Rizzolo
mattia at debian.org
Fri Jul 14 12:01:50 CEST 2017
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository diffoscope.
commit c12bee5fc718c918d6280102d4dbe688b0a553cf
Author: Mattia Rizzolo <mattia at debian.org>
Date: Fri Jul 14 11:46:27 2017 +0200
exc: in RequiredToolNotFound.get_package(), just call the new get_package_provider()
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
diffoscope/exc.py | 10 ++--------
1 file 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):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list