cmds and lib: Don't print() log messages

print() should be used to output information requested by a certain
command, but not for logging the process to achieve it. log() should
be used for the latter. The current code has the distinction not down
clearly, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-25 11:38:29 +01:00
commit 9b6ec109a1
3 changed files with 13 additions and 13 deletions

View file

@ -57,7 +57,7 @@ async def run_curl(args: list[str], parse_json: bool=True, wd=None, throw=None,
size = len(ret)
except:
pass
print(f'Failed to parse {size} bytes output of command '
log(ERR, f'Failed to parse {size} bytes output of command '
+ f'>{pretty_cmd(cmd, wd)}< ({str(e)}): "{ret}"', file=sys.stderr)
raise
return ret, stderr, status