Commit ae117fe0 authored by Chris Lamb's avatar Chris Lamb 💬

diffoscope.main: Tidy ListToolsAction argparse action command.

parent e51e801c
......@@ -280,11 +280,12 @@ class ListToolsAction(argparse.Action):
print("External-Tools-Required: ", end='')
print(', '.join(sorted(tool_required.all)))
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)
if os_override:
os_list = [os_override]
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment