download_bower: Remove cache entries with invalid SHA-1
Change-Id: I7c971b1c1b82c80da669036b3405bd52e193b9d2
This commit is contained in:
@@ -106,6 +106,11 @@ def main(args):
|
||||
'%s#%s:\n'
|
||||
'expected %s\n'
|
||||
'received %s\n') % (opts.p, opts.v, opts.s, sha1), file=sys.stderr)
|
||||
try:
|
||||
os.remove(cached)
|
||||
except OSError as err:
|
||||
if path.exists(cached):
|
||||
print('error removing %s: %s' % (cached, err), file=sys.stderr)
|
||||
return 1
|
||||
|
||||
shutil.copyfile(cached, outzip)
|
||||
|
Reference in New Issue
Block a user