Skip to content

Commit

Permalink
schedule: print yaml_dump instead of pprint
Browse files Browse the repository at this point in the history
This will allow to redirect output of dry-run to a file
which will produce a multi-document yaml, and can be
parsed easily afterwards.

Signed-off-by: Kyr Shatskyy <[email protected]>
  • Loading branch information
Kyr Shatskyy committed Jul 6, 2020
1 parent 926f657 commit efacd99
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions teuthology/schedule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pprint
import yaml

import teuthology.beanstalk
Expand Down Expand Up @@ -33,7 +32,7 @@ def main(args):
raise ValueError("Please use a more descriptive value for --name")
job_config = build_config(args)
if args['--dry-run']:
pprint.pprint(job_config)
print('---\n' + yaml.safe_dump(job_config))
else:
schedule_job(job_config, args['--num'], report_status)

Expand Down

0 comments on commit efacd99

Please sign in to comment.