binary_hash = (yl['binaries'][project][file_name])
return binary_hash
except KeyError:
- logger.info('No checksum entries found for {0}'.
- format(file_name))
binary_hash = 'null'
return binary_hash
logger.error('Key Error processing file_names list values')
try:
project_list = set((yl['file_audits'][project]['file_names']))
- logger.info('file_names waivers found for {0}'.
- format(project))
+ logger.info('file_names waivers found for %s', project)
except KeyError:
- logger.info('No file_names waivers found for {0}'.
- format(project))
+ logger.info('No file_names waivers found for %s', project)
file_names_re = re.compile("|".join(default_list),
flags=re.IGNORECASE)
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 {0}'.
- format(project))
+ logger.info('No file_contents waivers found for %s', project)
- file_contents_re = re.compile("|".join(default_list),
- flags=re.IGNORECASE)
+ return master_list, project_list_re
- 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
+ def file_ignore(self):
+ try:
+ file_ignore = (yl['file_ignore'])
+ except KeyError:
+ logger.error('Key Error processing file_ignore list values')
+ return file_ignore
def licence_extensions(self):
try: