[diffoscope] 02/05: diffoscope.main: Tidy ListToolsAction argparse action command.

Chris Lamb chris at chris-lamb.co.uk
Thu Jan 11 10:59:32 CET 2018


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit ae117fe01f2765eef76880407f0e9b8bc613877e
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Jan 11 12:37:35 2018 +0530

    diffoscope.main: Tidy ListToolsAction argparse action command.
---
 diffoscope/main.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/diffoscope/main.py b/diffoscope/main.py
index 9ec4d60..1137057 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -280,11 +280,12 @@ class ListToolsAction(argparse.Action):
 
         print("External-Tools-Required: ", end='')
         print(', '.join(sorted(tool_required.all)))
+
+        current_os = get_current_os()
+        os_list = [current_os] if (current_os in OS_NAMES) else iter(OS_NAMES)
         if os_override:
             os_list = [os_override]
-        else:
-            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='')
@@ -294,6 +295,7 @@ class ListToolsAction(argparse.Action):
                 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