1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 03:19:53 +03:00

Do not recompile if firmware is already there

Always print filename on compile error so that the email handler can attach the error log
This commit is contained in:
3djc 2017-03-30 08:15:58 +02:00
parent 443d75c0ac
commit 361b2b707f

View file

@ -202,6 +202,7 @@ def build_firmware(path):
file(outpath, "a").write("\n".join(cmd) + output + error)
else:
file(errpath, "w").write(output + error)
print filename
exit(COMPILATION_ERROR)
# Launch make
@ -212,6 +213,7 @@ def build_firmware(path):
file(outpath, "a").write(output + error)
else:
file(errpath, "w").write(output + error)
print filename
exit(COMPILATION_ERROR)
if what == "firmware":
@ -228,6 +230,7 @@ def build_firmware(path):
shutil.move(target, path)
if os.path.isfile(errpath):
print filename
exit(COMPILATION_ERROR)
lockpath = path + ".lock"
@ -236,7 +239,11 @@ try:
with lock.acquire(timeout = 60*60):
if not os.path.isfile(path):
build_firmware(path)
else:
print filename
exit(0)
except filelock.Timeout:
print filename
exit(COMPILATION_ERROR)
print filename