From a303b53209c2ba7fdb2ec0b867bdae322dd77ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ga=C5=88o?= Date: Fri, 11 Dec 2020 13:24:06 +0100 Subject: [PATCH] Add checking if the build directory exists and move expression after docstring --- tools/idf_py_actions/serial_ext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/idf_py_actions/serial_ext.py b/tools/idf_py_actions/serial_ext.py index 9833aacf5b..a650f20a53 100644 --- a/tools/idf_py_actions/serial_ext.py +++ b/tools/idf_py_actions/serial_ext.py @@ -115,6 +115,7 @@ def action_extensions(base_actions, project_path): """ Run esptool to flash the entire project, from an argfile generated by the build system """ + ensure_build_directory(args, ctx.info_name) flasher_args_path = { # action -> name of flasher args file generated by build system "bootloader-flash": "flash_bootloader_args", @@ -129,6 +130,7 @@ def action_extensions(base_actions, project_path): run_tool("esptool.py", esptool_args, args.build_dir) def erase_flash(action, ctx, args): + ensure_build_directory(args, ctx.info_name) esptool_args = _get_esptool_args(args) esptool_args += ["erase_flash"] run_tool("esptool.py", esptool_args, args.build_dir)