From 5bb0237860509ca39b5b5cde729c66473aa40b4f Mon Sep 17 00:00:00 2001 From: "martin.gano" Date: Mon, 20 Jul 2020 14:51:47 +0200 Subject: [PATCH] Add checking if the build directory exists and move expression after docstring --- tools/idf_py_actions/serial_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/idf_py_actions/serial_ext.py b/tools/idf_py_actions/serial_ext.py index 1238742ba0..c8738d4366 100644 --- a/tools/idf_py_actions/serial_ext.py +++ b/tools/idf_py_actions/serial_ext.py @@ -114,10 +114,10 @@ def action_extensions(base_actions, project_path): run_tool("idf_monitor", monitor_args, args.project_dir) def flash(action, ctx, args): - ensure_build_directory(args, ctx.info_name) """ Run esptool to flash the entire project, from an argfile generated by the build system """ + ensure_build_directory(args, ctx.info_name) if args.port is None: args.port = _get_default_serial_port() @@ -125,6 +125,7 @@ def action_extensions(base_actions, project_path): "ESPBAUD": str(args.baud)}) 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)