Merge ~emitorino/ubuntu-cve-tracker:add_external_subprojects_metadata_validation into ubuntu-cve-tracker:master

Proposed by Emilia Torino
Status: Merged
Merged at revision: b4db9b9938ccc8c76d03437b4223efeed04a288c
Proposed branch: ~emitorino/ubuntu-cve-tracker:add_external_subprojects_metadata_validation
Merge into: ubuntu-cve-tracker:master
Diff against target: 24 lines (+6/-7)
1 file modified
scripts/cve_lib.py (+6/-7)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+454203@code.launchpad.net

Commit message

- cve_lib.py: validate external subprojects metadata

Description of the change

In https://code.launchpad.net/~litios/ubuntu-cve-tracker/+git/ubuntu-cve-tracker/+merge/449839, the new subprojects's structure was added, but there validations were disabled since the data was not yet present.

We are now ready to enable this validation.

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

LGTM! Thanks Emi.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/cve_lib.py b/scripts/cve_lib.py
2index 272ec36..fe5b889 100755
3--- a/scripts/cve_lib.py
4+++ b/scripts/cve_lib.py
5@@ -963,13 +963,12 @@ def load_external_subprojects():
6 main_config = read_external_subproject_config(subproject_path)
7 support_metadata = {}
8
9- # Disable this check until we have the information available
10- # for key in MANDATORY_EXTERNAL_SUBPROJECT_KEYS:
11- # if key not in main_config:
12- # print('%s missing "%s" field.' % (subproject_path, key))
13- # raise ValueError
14- # else:
15- # support_metadata[key] = main_config[key]
16+ for key in MANDATORY_EXTERNAL_SUBPROJECT_KEYS:
17+ if key not in main_config:
18+ print('%s missing "%s" field.' % (subproject_path, key))
19+ raise ValueError
20+ else:
21+ support_metadata[key] = main_config[key]
22
23 for ppa in main_config['ppas']:
24 config = main_config['ppas'][ppa]

Subscribers

People subscribed via source and target branches