Skip to content
Snippets Groups Projects
Unverified Commit 1dc30cc6 authored by Caleb Connolly's avatar Caleb Connolly :recycle:
Browse files

Use stderr for status prints (MR 2)


This allows ttq to be used in scripts more easily.

Signed-off-by: default avatarCaleb Connolly <caleb.connolly@linaro.org>
parent cb6daf7a
No related branches found
No related tags found
1 merge request!2Make TTQ behave better in scripts
......@@ -55,7 +55,7 @@ def parse_args_query_soc():
for soc in ttq.wiki.SOCS:
if search_str in soc.lower():
devices = ttq.wiki.parse_soc_devices(soc)
print(f"Found {len(devices)} device(s) with {soc}")
print(f"Found {len(devices)} device(s) with {soc}", file=sys.stderr)
ARGS_QUERY_SOCS[soc] = devices
# Put devices in ARGS_QUERY_DEVICES so ttq.match.by_device() can use it
......
# Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
import sys
import ttq.match
......@@ -22,7 +24,8 @@ def by_ui():
print()
print(f"Matched {len(ttq.match.UIS_MATCHED)} user interfaces,"
f" {len(ttq.match.USERS_MATCHED)} {ttq.args.ARGS_USER_TYPE} users.")
f" {len(ttq.match.USERS_MATCHED)} {ttq.args.ARGS_USER_TYPE} users.",
file=sys.stderr)
def by_device():
......@@ -32,7 +35,8 @@ def by_device():
print()
print(f"Matched {len(ttq.match.DEVICES_MATCHED)} devices,"
f" {len(ttq.match.USERS_MATCHED)} {ttq.args.ARGS_USER_TYPE} users.")
f" {len(ttq.match.USERS_MATCHED)} {ttq.args.ARGS_USER_TYPE} users.",
file=sys.stderr)
def by_soc():
......@@ -45,7 +49,8 @@ def by_soc():
print()
print(f"Matched {len(ttq.match.SOCS_MATCHED)} SoCs,"
f" {len(ttq.match.DEVICES_MATCHED)} devices,"
f" {len(ttq.match.USERS_MATCHED)} {ttq.args.ARGS_USER_TYPE} users.")
f" {len(ttq.match.USERS_MATCHED)} {ttq.args.ARGS_USER_TYPE} users.",
file=sys.stderr)
def notes():
notes = ttq.match.NOTES_MATCHED
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment