aboutsummaryrefslogtreecommitdiffstats
path: root/anteater/src/get_lists.py
diff options
context:
space:
mode:
authorLuke Hinds <lhinds@redhat.com>2017-06-27 06:48:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-27 06:48:22 +0000
commit5ab9c733f380b2a327e64fcfa760d28639994982 (patch)
tree741fd7735f53425fdbb8a29f707484b4b2a46a60 /anteater/src/get_lists.py
parent9371bc28b1bbabf2dc130039e1a8a3a3c66c1ba1 (diff)
parent48ce2a2317eb86b73b6da297c8ed9082b06faf9f (diff)
Merge "Implements sha256 exception functionality"
Diffstat (limited to 'anteater/src/get_lists.py')
-rw-r--r--anteater/src/get_lists.py25
1 files changed, 10 insertions, 15 deletions
diff --git a/anteater/src/get_lists.py b/anteater/src/get_lists.py
index 713321f..d7b0c47 100644
--- a/anteater/src/get_lists.py
+++ b/anteater/src/get_lists.py
@@ -69,28 +69,23 @@ class GetLists(object):
self.loaded = True
def binary_list(self, project):
- project_list = False
- self.load_project_exception_file(yl.get('project_exceptions'), project)
try:
default_list = (yl['binaries']['binary_ignore'])
except KeyError:
logger.error('Key Error processing binary list values')
- try:
- project_list = (yl['binaries'][project]['binary_ignore'])
- except KeyError:
- logger.info('No binary waivers found for {0}'.
- format(project))
binary_re = re.compile("|".join(default_list),
- flags=re.IGNORECASE)
+ flags=re.IGNORECASE)
+ return binary_re
- if project_list:
- binary_project_re = re.compile("|".join(project_list),
- flags=re.IGNORECASE)
- return binary_re, binary_project_re
- else:
- binary_project_re = re.compile("")
- return binary_re, binary_project_re
+ def binary_hash(self, project, patch_file):
+ self.load_project_exception_file(yl.get('project_exceptions'), project)
+ file_name = os.path.basename(patch_file)
+ try:
+ binary_hash = (yl['binaries'][project][file_name])
+ except KeyError:
+ logger.error('Key Error processing binary hash values')
+ return binary_hash
def file_audit_list(self, project):
project_list = False