Get rid of shadowed --json argument to `rbt status-update`

Review Request #12111 — Created March 7, 2022 and submitted

Information

RBTools
master

Reviewers

The rbt status-update command had an existing --json argument, which
was colliding with the new project-wide --json output. This change
updates that command to use the new argument and output objects to
implement the same behavior.

Ran rbt status-update --json and saw it work correctly instead of spew
errors about building the argument parser.

Summary ID
Get rid of shadowed --json argument to `rbt status-update`
The `rbt status-update` command had an existing `--json` argument, which was colliding with the new project-wide `--json` output. This change updates that command to use the new argument and output objects to implement the same behavior. Testing Done: Ran `rbt status-update --json` and saw it work correctly instead of spew errors about building the argument parser.
17660ee46126b43360e0e2191ad5227ac9812b5e
Description From Last Updated

Can we generate the list up-front and then set it? Less expensive and a bit more readable.

chipx86chipx86
chipx86
  1. 
      
  2. rbtools/commands/status_update.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Can we generate the list up-front and then set it? Less expensive and a bit more readable.

    1. It's not actually any less expensive (the JSON output .append method adds to an existing list-type key), so all it would be doing is adding another variable which has to be kept track of. I suppose it would cut back marginally on function calls but this really isn't a critical path.

  3. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (a525550)
Loading...