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:
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)
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue