Skip to content

Commit

Permalink
fix error with dates in json in janitor.py
Browse files Browse the repository at this point in the history
The janitor would fail if a branch node contained a date value. As a result, the branches.json, latest.json and overview.json files are never created and therefore acu and/or luci-app-attendedsysupgrade would not be able to update from the asu instance.

Converting json node values to string by default fixes the issue.

Signed-off-by: Marc Ahlgrim <[email protected]>
  • Loading branch information
onemarcfifty authored and aparcar committed Dec 30, 2022
1 parent 15f1bfa commit ddc88cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion asu/janitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,18 @@ def update_meta_json():
json.dumps(
current_app.config["OVERVIEW"],
indent=2,
sort_keys=False,
default=str
)
)

(current_app.config["JSON_PATH"] / "branches.json").write_text(
json.dumps(list(branches.values()))
json.dumps(
list(branches.values()),
indent=2,
sort_keys=False,
default=str
)
)

(current_app.config["JSON_PATH"] / "latest.json").write_text(
Expand Down

0 comments on commit ddc88cb

Please sign in to comment.