diff options
author | lhinds <lhinds@redhat.com> | 2017-08-04 14:46:24 +0100 |
---|---|---|
committer | lhinds <lhinds@redhat.com> | 2017-08-04 15:48:30 +0100 |
commit | d1db65c86809a0ea9adae1423237cdc60eb026fb (patch) | |
tree | 7ee5aa0a3cfec267dc0842b2013aa7917253f9a7 /anteater/src/get_lists.py | |
parent | ea71a6990ff8f2f6f327a4416374877b0c2720e5 (diff) |
Implements Rationale Field
This change Implements a descriptive field to explain the
rationale behind a block.
In time this will be part of a sphinx auto build documentation
system, which extracts the `desc` field and places it into a
template. The user will then be provided with a url.
JIRA: RELENG-276
Change-Id: I82b4eb02fe502928726846cc08388a7a4f0ea2f6
Signed-off-by: lhinds <lhinds@redhat.com>
Diffstat (limited to 'anteater/src/get_lists.py')
-rw-r--r-- | anteater/src/get_lists.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/anteater/src/get_lists.py b/anteater/src/get_lists.py index 2419660..fd80a6a 100644 --- a/anteater/src/get_lists.py +++ b/anteater/src/get_lists.py @@ -120,24 +120,19 @@ class GetLists(object): project_list = False self.load_project_exception_file(yl.get('project_exceptions'), project) try: - default_list = set((yl['file_audits']['file_contents'])) + master_list = (yl['file_audits']['file_contents']) + except KeyError: logger.error('Key Error processing file_contents list values') + try: project_list = set((yl['file_audits'][project]['file_contents'])) + project_list_re = re.compile("|".join(project_list), + flags=re.IGNORECASE) except KeyError: logger.info('No file_contents waivers found for %s', project) - file_contents_re = re.compile("|".join(default_list), - flags=re.IGNORECASE) - - if project_list: - file_contents_proj_re = re.compile("|".join(project_list), - flags=re.IGNORECASE) - return file_contents_re, file_contents_proj_re - else: - file_contents_proj_re = re.compile("") - return file_contents_re, file_contents_proj_re + return master_list, project_list_re def licence_extensions(self): try: |