mirror of https://github.com/arendst/Tasmota.git
no exception when metrics not found (#22170)
This commit is contained in:
parent
3b28542d9c
commit
5d0cc8144a
|
@ -6,8 +6,11 @@ from os.path import join
|
||||||
|
|
||||||
def firm_metrics(source, target, env):
|
def firm_metrics(source, target, env):
|
||||||
if env["PIOPLATFORM"] == "espressif32":
|
if env["PIOPLATFORM"] == "espressif32":
|
||||||
|
try:
|
||||||
import tasmota_metrics
|
import tasmota_metrics
|
||||||
env.Execute("$PYTHONEXE -m tasmota_metrics \"" + str(tasmotapiolib.get_source_map_path(env).resolve()) + "\"")
|
env.Execute("$PYTHONEXE -m tasmota_metrics \"" + str(tasmotapiolib.get_source_map_path(env).resolve()) + "\"")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
elif env["PIOPLATFORM"] == "espressif8266":
|
elif env["PIOPLATFORM"] == "espressif8266":
|
||||||
map_file = join(env.subst("$BUILD_DIR")) + os.sep + "firmware.map"
|
map_file = join(env.subst("$BUILD_DIR")) + os.sep + "firmware.map"
|
||||||
with open(map_file,'r', encoding='utf-8') as f:
|
with open(map_file,'r', encoding='utf-8') as f:
|
||||||
|
|
Loading…
Reference in New Issue