diff options
author | lhinds <lhinds@redhat.com> | 2017-06-27 21:12:06 +0100 |
---|---|---|
committer | lhinds <lhinds@redhat.com> | 2017-06-27 21:17:15 +0100 |
commit | b1bac4d7cb56e0b06dda64dc8b3305d04768eb14 (patch) | |
tree | 4660b573e7979bc802b3e349f90e8ca6e53c093f /anteater/src/patch_scan.py | |
parent | b044e0f17700ae3f7621734daf5c4e502b362dde (diff) |
Fixes UnboundLocalError issue.
If no hash exists in the project exception file, then `return
binary_hash` is Nonetype which throws an Unbound variable error.
This change adds some dummy text to allow try / except statements
to deal with missing entries in project exception files.
JIRA: RELENG-264
Change-Id: I98fb4b01a2930b350794326d4cf735c8e014e00a
Signed-off-by: lhinds <lhinds@redhat.com>
Diffstat (limited to 'anteater/src/patch_scan.py')
-rw-r--r-- | anteater/src/patch_scan.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/anteater/src/patch_scan.py b/anteater/src/patch_scan.py index 51b3430..f8ef225 100644 --- a/anteater/src/patch_scan.py +++ b/anteater/src/patch_scan.py @@ -89,7 +89,7 @@ def scan_patch(project, patch_file, binary_list, file_audit_list, else: logger.error('Non Whitelisted Binary file: {0}'. format(patch_file)) - logger.error('Please submit patch with this hash:: {0}'. + logger.error('Submit patch with the following hash: {0}'. format(hasher.hexdigest())) failure = True with open(reports_dir + "binaries-" + project + ".log", "a") \ |