1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Prevent rewriting Updater_Signing.h if content unchanged (#7627)

This commit is contained in:
Harald
2020-10-03 21:47:30 +02:00
committed by GitHub
parent d0300806cd
commit 8b8639e833

View File

@ -74,6 +74,13 @@ def main():
outdir = os.path.dirname(args.out)
if not os.path.exists(outdir):
os.makedirs(outdir)
try:
with open(args.out, "r") as inp:
old_val = inp.read()
if old_val == val:
return
except Exception:
pass
with open(args.out, "w") as f:
f.write(val)
return 0