- if not binary_list.search(patch_file) and not binary_project_list\
- .search(patch_file):
- logger.error('Non Whitelisted Binary file: {0}'.
- format(patch_file))
+ hashlist = get_lists.GetLists()
+ binary_hash = hashlist.binary_hash(project, patch_file)
+ if not binary_list.search(patch_file):
+ with open(patch_file, 'rb') as afile:
+ buf = afile.read()
+ hasher.update(buf)
+ if hasher.hexdigest() in binary_hash:
+ logger.info('Found matching file hash for file: {0}'.
+ format(patch_file))
+ else:
+ logger.error('Non Whitelisted Binary file: {0}'.
+ format(patch_file))
+ logger.error('Please submit patch with this hash:: {0}'.
+ format(hasher.hexdigest()))