Skip to content

Commit 704a50a

Browse files
authored
Merge pull request #6172 from tannewt/supervisor_reload
Fix supervisor.reload
2 parents 66fa923 + 78cb61c commit 704a50a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
413413

414414
if (result.return_code & PYEXEC_RELOAD) {
415415
next_code_stickiness_situation |= SUPERVISOR_NEXT_CODE_OPT_STICKY_ON_RELOAD;
416+
// Reload immediately unless the reload is due to autoreload. In that
417+
// case, we wait below to see if any other writes occur.
418+
if (supervisor_get_run_reason() != RUN_REASON_AUTO_RELOAD) {
419+
skip_repl = true;
420+
skip_wait = true;
421+
}
416422
} else if (result.return_code == 0) {
417423
next_code_stickiness_situation |= SUPERVISOR_NEXT_CODE_OPT_STICKY_ON_SUCCESS;
418424
if (next_code_options & SUPERVISOR_NEXT_CODE_OPT_RELOAD_ON_SUCCESS) {

ports/nrf/boards/bluemicro833/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ CIRCUITPY_RE = 0
3636
CIRCUITPY_RGBMATRIX = 0
3737
CIRCUITPY_SDCARDIO = 0
3838
CIRCUITPY_SYNTHIO = 0
39+
CIRCUITPY_TRACEBACK = 0
3940
CIRCUITPY_TOUCHIO = 0
4041
CIRCUITPY_ULAB = 0
4142
CIRCUITPY_USB_MIDI = 0

0 commit comments

Comments
 (0)