mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
res_collect: fix if resources.py does not exist
This commit is contained in:
parent
3d7a9d780d
commit
f93b8a08bc
@ -47,9 +47,13 @@ for k in sorted(resources.keys()):
|
||||
bio.write(" '%s': %s,\n" % (k, resources[k]))
|
||||
bio.write('}\n')
|
||||
|
||||
with open(resfile, 'r') as f:
|
||||
stale = f.read()
|
||||
fresh = bio.getvalue()
|
||||
try:
|
||||
with open(resfile, 'r') as f:
|
||||
stale = f.read()
|
||||
except:
|
||||
stale = None
|
||||
|
||||
fresh = bio.getvalue()
|
||||
|
||||
if stale != fresh:
|
||||
with open(resfile, 'wt') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user