mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 20:26:32 +00:00
prevent crash when no firmware exits
This commit is contained in:
parent
985149c934
commit
4fd6694efc
@ -24,10 +24,11 @@ if "nobuild" in COMMAND_LINE_TARGETS:
|
|||||||
source_firm = join(env.subst("$PROJECT_DIR"), "build_output","firmware",firm_name)
|
source_firm = join(env.subst("$PROJECT_DIR"), "build_output","firmware",firm_name)
|
||||||
if not os.path.exists(join(env.subst("$BUILD_DIR"))):
|
if not os.path.exists(join(env.subst("$BUILD_DIR"))):
|
||||||
os.makedirs(join(env.subst("$BUILD_DIR")))
|
os.makedirs(join(env.subst("$BUILD_DIR")))
|
||||||
shutil.copy(source_firm, join(env.subst("$BUILD_DIR")))
|
if os.path.isfile(source_firm):
|
||||||
target_ren = join(env.subst("$BUILD_DIR"), firm_name)
|
shutil.copy(source_firm, join(env.subst("$BUILD_DIR")))
|
||||||
renamed = join(env.subst("$BUILD_DIR"), "firmware.bin")
|
target_ren = join(env.subst("$BUILD_DIR"), firm_name)
|
||||||
os.rename(target_ren, renamed)
|
renamed = join(env.subst("$BUILD_DIR"), "firmware.bin")
|
||||||
|
os.rename(target_ren, renamed)
|
||||||
|
|
||||||
if env["PIOPLATFORM"] != "espressif32":
|
if env["PIOPLATFORM"] != "espressif32":
|
||||||
framework_dir = env.PioPlatform().get_package_dir("framework-arduinoespressif8266")
|
framework_dir = env.PioPlatform().get_package_dir("framework-arduinoespressif8266")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user