fix error reporting for bad SHA

Fix the way the error message is constructed when there is a bad SHA to
the error is reported instead of seeing a KeyError.

Change-Id: I5ff521dee807d3497b2d3496f4361c8fad57d86e
This commit is contained in:
Doug Hellmann 2015-12-02 13:33:28 +00:00
parent 49dad9ccb8
commit 439104fec3

View File

@ -114,7 +114,11 @@ def main():
print('NOT A SHA HASH')
errors.append(
('%(repo)s version %(version)s release from '
'%(hash)r, which is not a hash') % project
'%(hash)r, which is not a hash') % {
'repo': project['repo'],
'hash': project['hash'],
'version': release['version'],
}
)
else:
# Report if the SHA exists or not (an error if it