Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit a0e3edd

Browse files
authored
Merge pull request #106 from pycom/allow_ctrl-d_when_pybytes_on_boot_disabled
Update pyexec.c
2 parents 9fb2548 + a7c6e2c commit a0e3edd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/utils/pyexec.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,13 @@ int pyexec_friendly_repl(void) {
491491
} else if (ret == CHAR_CTRL_D) {
492492
// exit for a soft reset
493493
mp_hal_stdout_tx_str("\r\n");
494-
#if (VARIANT == PYBYTES)
495-
continue;
496-
#else
497-
vstr_clear(&line);
498-
return PYEXEC_FORCED_EXIT;
499-
#endif
494+
if (config_get_pybytes_autostart()) {
495+
continue;
496+
}
497+
else {
498+
vstr_clear(&line);
499+
return PYEXEC_FORCED_EXIT;
500+
}
500501
} else if (ret == CHAR_CTRL_E) {
501502
// paste mode
502503
mp_hal_stdout_tx_str("\r\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\r\n=== ");

0 commit comments

Comments
 (0)