mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +03:00
Cosmetics
This commit is contained in:
parent
75526d9310
commit
a6e146ba78
1 changed files with 4 additions and 2 deletions
|
@ -171,6 +171,7 @@ filename += "-" + language + ext
|
||||||
path = os.path.join(directory, filename)
|
path = os.path.join(directory, filename)
|
||||||
errpath = path + ".err"
|
errpath = path + ".err"
|
||||||
|
|
||||||
|
|
||||||
def build_firmware(path):
|
def build_firmware(path):
|
||||||
srcdir = os.path.dirname(os.path.realpath(__file__)) + "/../.."
|
srcdir = os.path.dirname(os.path.realpath(__file__)) + "/../.."
|
||||||
outpath = path + ".out"
|
outpath = path + ".out"
|
||||||
|
@ -203,9 +204,9 @@ def build_firmware(path):
|
||||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
output, error = proc.communicate()
|
output, error = proc.communicate()
|
||||||
if proc.returncode == 0:
|
if proc.returncode == 0:
|
||||||
file(outpath, "a").write(output + error)
|
open(outpath, "a").write(output + error)
|
||||||
else:
|
else:
|
||||||
file(errpath, "w").write(output + error)
|
open(errpath, "w").write(output + error)
|
||||||
print(filename)
|
print(filename)
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
|
@ -219,6 +220,7 @@ def build_firmware(path):
|
||||||
# Copy binary to the binaries directory
|
# Copy binary to the binaries directory
|
||||||
shutil.move(target, path)
|
shutil.move(target, path)
|
||||||
|
|
||||||
|
|
||||||
if os.path.isfile(errpath):
|
if os.path.isfile(errpath):
|
||||||
print(filename)
|
print(filename)
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue