Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam committed Aug 11, 2023
1 parent 259addc commit 66ddae5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/extra_ota.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ def main(ota: Manifest) -> None:

if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Generate extra.json from ota.json manifest for flash tool")
parser.add_argument("ota_json", default="ota.json", help="manifest file")
parser.add_argument("production", action="store_true")
args = parser.parse_args()

try:
with open(args.ota_json, "r") as f:
ota_file = f"ota-{'staging' if args.production else ''}.json"
with open(ROOT / "output" / "ota" / ota_file, "r", encoding="utf-8") as f:
ota_json = json.load(f)
except FileNotFoundError:
print(f"File not found: {args.ota_json}")
Expand Down

0 comments on commit 66ddae5

Please sign in to comment.