Skip to content

Commit

Permalink
unwonnd json write
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Oct 9, 2017
1 parent 0d61289 commit a25a4a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli4/cli4.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ def cli4(args):
results = results[0]

if output == 'json':
# sys.stdout.write(json.dumps(results, indent=4, sort_keys=True) + '\n')
json.dumps(results, sys.stdout, indent=4, sort_keys=True)
sys.stdout.write('\n')
sys.stdout.write(json.dumps(results, indent=4, sort_keys=True) + '\n')
# json.dumps(results, sys.stdout, indent=4, sort_keys=True)
# sys.stdout.write('\n')
if output == 'yaml':
sys.stdout.write(yaml.safe_dump(results))

0 comments on commit a25a4a9

Please sign in to comment.