clover: update-sha1sums: handle FileNotFound exception
Show missing file name and continue Signed-off-by: pix106 <sbordenave@gmail.com>
This commit is contained in:
parent
64f7e6479d
commit
eefd0cb8dd
1 changed files with 7 additions and 3 deletions
|
@ -104,10 +104,14 @@ def update():
|
|||
if filePath[0] == '-':
|
||||
filePath = filePath[1:]
|
||||
|
||||
try:
|
||||
with open(os.path.join(vendorPath, filePath), 'rb') as f:
|
||||
hash = sha1(f.read()).hexdigest()
|
||||
|
||||
lines[index] = '%s|%s' % (line, hash)
|
||||
|
||||
except FileNotFoundError:
|
||||
print("File not found: %s" % filePath)
|
||||
|
||||
lines.append('')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue