summaryrefslogtreecommitdiff
path: root/ports/esp32/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/main.c')
-rw-r--r--ports/esp32/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ports/esp32/main.c b/ports/esp32/main.c
index b514f44e0..044b43655 100644
--- a/ports/esp32/main.c
+++ b/ports/esp32/main.c
@@ -124,8 +124,11 @@ soft_reset:
// run boot-up scripts
pyexec_frozen_module("_boot.py", false);
- pyexec_file_if_exists("boot.py");
- if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
+ int ret = pyexec_file_if_exists("boot.py");
+ if (ret & PYEXEC_FORCED_EXIT) {
+ goto soft_reset_exit;
+ }
+ if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL && ret != 0) {
int ret = pyexec_file_if_exists("main.py");
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;