Skip to content

Commit a58a358

Browse files
committed
Exit with error message when partition table is missing for ESP-IDF
1 parent caedd9e commit a58a358

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

builder/frameworks/espidf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,11 @@ def generate_empty_partition_image(binary_path, image_size):
835835

836836

837837
def get_partition_info(pt_path, pt_offset, pt_params):
838-
assert os.path.isfile(pt_path)
838+
if not os.path.isfile(pt_path):
839+
sys.stderr.write(
840+
"Missing partition table file `%s`\n" % os.path.basename(pt_path))
841+
env.Exit(1)
842+
839843
cmd = [
840844
env.subst("$PYTHONEXE"),
841845
os.path.join(FRAMEWORK_DIR, "components", "partition_table", "parttool.py"),

0 commit comments

Comments
 (0)