From a58a358fdc1122523c7fcf7b4fc8b4016e48961d Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 15 Dec 2020 18:37:30 +0200 Subject: [PATCH] Exit with error message when partition table is missing for ESP-IDF --- builder/frameworks/espidf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 494139a..9609c50 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -835,7 +835,11 @@ def generate_empty_partition_image(binary_path, image_size): def get_partition_info(pt_path, pt_offset, pt_params): - assert os.path.isfile(pt_path) + if not os.path.isfile(pt_path): + sys.stderr.write( + "Missing partition table file `%s`\n" % os.path.basename(pt_path)) + env.Exit(1) + cmd = [ env.subst("$PYTHONEXE"), os.path.join(FRAMEWORK_DIR, "components", "partition_table", "parttool.py"),