[diffoscope] 01/02: diffoscope.main: Tidy --list-tools filtering.
Chris Lamb
chris at chris-lamb.co.uk
Wed Mar 29 14:41:06 CEST 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch experimental
in repository diffoscope.
commit 6e96786b7c4ca965827045ec94c5667edef45c1e
Author: Chris Lamb <lamby at debian.org>
Date: Wed Mar 29 13:36:39 2017 +0100
diffoscope.main: Tidy --list-tools filtering.
---
diffoscope/main.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/diffoscope/main.py b/diffoscope/main.py
index 9de4926..3b82a7a 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -221,11 +221,14 @@ class ListToolsAction(argparse.Action):
current_os = get_current_os()
os_list = [current_os] if (current_os in OS_NAMES) else iter(OS_NAMES)
for os in os_list:
+ tools = set()
print("Available-in-{}-packages: ".format(OS_NAMES[os]), end='')
- print(', '.join(sorted(filter(None, {
- EXTERNAL_TOOLS.get(k, {}).get(os, None)
- for k in tool_required.all
- }))))
+ for x in tool_required.all:
+ try:
+ tools.add(EXTERNAL_TOOLS[x][os])
+ except KeyError:
+ pass
+ print(', '.join(sorted(tools)))
sys.exit(0)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list