cliquery: Dump individual objects as an array.

This provides nicer output when querying multiple objects in one run.
This commit is contained in:
Brett Smith 2020-11-24 09:22:59 -05:00
parent 86b8eddc2e
commit 1b0740ad5d

View file

@ -189,7 +189,7 @@ def main(
paypal_obj = paypal.get_transaction(
paypal_id, args.end_date, args.start_date, args.transaction_fields,
)
yaml.dump(paypal_obj, stdout, Dumper=YAMLDumper)
yaml.dump([paypal_obj], stdout, Dumper=YAMLDumper)
return 0
entry_point = cliutil.make_entry_point(__name__, PROGNAME)