Skip to content

Commit

Permalink
review cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Towles <[email protected]>
  • Loading branch information
wonderslug committed Aug 20, 2021
1 parent ef80e46 commit b78f7dd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cdpctl/validation/renderer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,13 @@ def render(self, issues, output_file):
json_rep["problems"] = []
json_rep["warnings"] = []
for problem in value["problem"]:
json_prob = {}
json_prob["message"] = problem.message
json_prob["resources"] = problem.resources
json_rep["problems"].append(json_prob)
json_rep["problems"].append(
{"message": problem.message, "resources": problem.resources}
)
for warning in value["warning"]:
json_warn = {}
json_warn["message"] = warning.message
json_warn["resources"] = warning.resources
json_rep["warnings"].append(json_warn)
json_rep["warnings"].append(
{"message": warning.message, "resources": warning.resources}
)
json_issues.append(json_rep)

with smart_open(output_file) as f:
Expand Down

0 comments on commit b78f7dd

Please sign in to comment.