mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +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:
parent
443d75c0ac
commit
361b2b707f
1 changed files with 7 additions and 0 deletions
|
@ -202,6 +202,7 @@ def build_firmware(path):
|
||||||
file(outpath, "a").write("\n".join(cmd) + output + error)
|
file(outpath, "a").write("\n".join(cmd) + output + error)
|
||||||
else:
|
else:
|
||||||
file(errpath, "w").write(output + error)
|
file(errpath, "w").write(output + error)
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
# Launch make
|
# Launch make
|
||||||
|
@ -212,6 +213,7 @@ def build_firmware(path):
|
||||||
file(outpath, "a").write(output + error)
|
file(outpath, "a").write(output + error)
|
||||||
else:
|
else:
|
||||||
file(errpath, "w").write(output + error)
|
file(errpath, "w").write(output + error)
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
if what == "firmware":
|
if what == "firmware":
|
||||||
|
@ -228,6 +230,7 @@ def build_firmware(path):
|
||||||
shutil.move(target, path)
|
shutil.move(target, path)
|
||||||
|
|
||||||
if os.path.isfile(errpath):
|
if os.path.isfile(errpath):
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
lockpath = path + ".lock"
|
lockpath = path + ".lock"
|
||||||
|
@ -236,7 +239,11 @@ try:
|
||||||
with lock.acquire(timeout = 60*60):
|
with lock.acquire(timeout = 60*60):
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
build_firmware(path)
|
build_firmware(path)
|
||||||
|
else:
|
||||||
|
print filename
|
||||||
|
exit(0)
|
||||||
except filelock.Timeout:
|
except filelock.Timeout:
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
print filename
|
print filename
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue