Skip to content

Commit 8ab04ee

Browse files
authored
Use click.echo instead of print (#117)
1 parent 04e7662 commit 8ab04ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

alertaclient/commands/cmd_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def cli(obj, ids, filters, display, from_date=None):
3737
r = client.http.get('/alerts', query)
3838

3939
if obj['output'] == 'json':
40-
print(json.dumps(r['alerts']))
40+
click.echo(json.dumps(r['alerts'], sort_keys=True, indent=4, ensure_ascii=False))
4141
else:
4242
alerts = [Alert.parse(a) for a in r['alerts']]
4343
last_time = r['lastTime']

0 commit comments

Comments
 (0)