Skip to content

Commit ebf7008

Browse files
committed
utils: Convert prints to logging calls
Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 3d49717 commit ebf7008

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git_pw/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ def git_am(mbox: str, args: ty.Tuple[str, ...]) -> None:
6666
try:
6767
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
6868
except subprocess.CalledProcessError as exc:
69-
print(exc.output.decode('utf-8'))
69+
LOG.error('Failed to apply patch:\n%s', exc.output.decode('utf-8'))
7070
sys.exit(exc.returncode)
7171
else:
72-
print(output.decode('utf-8'), end='')
72+
LOG.info(output.decode('utf-8'))
7373

7474

7575
def _tabulate(
@@ -92,7 +92,7 @@ def _tabulate(
9292
writer.writerow([ensure_str(i) for i in item])
9393
return result.getvalue()
9494

95-
print('pw.format must be one of: table, simple, csv')
95+
LOG.error('pw.format must be one of: table, simple, csv')
9696
sys.exit(1)
9797

9898

0 commit comments

Comments
 (0)