# Check if Binary is whitelisted
hashlist = get_lists.GetLists()
- binary_hash = hashlist.binary_hash(project, full_path)
+ split_path = full_path.split(project + '/', 1)[-1]
+ binary_hash = hashlist.binary_hash(project, split_path)
- if is_binary(full_path) and not binary_list.search(full_path):
+ if is_binary(full_path):
with open(full_path, 'rb') as afile:
buf = afile.read()
hasher.update(buf)
"a") as gate_report:
gate_report.write('Non Whitelisted Binary: {0}\n'.
format(full_path))
+ gate_report.write(
+ 'Submit patch with the following hash: {0}\n'.
+ format(hasher.hexdigest()))
else:
if not items.endswith(tuple(file_ignore)):