aboutsummaryrefslogtreecommitdiff
path: root/ports/nrf/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/nrf/main.c')
-rw-r--r--ports/nrf/main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ports/nrf/main.c b/ports/nrf/main.c
index b9c29e753..e1ffce938 100644
--- a/ports/nrf/main.c
+++ b/ports/nrf/main.c
@@ -227,12 +227,8 @@ pin_init0();
#if MICROPY_VFS || MICROPY_MBFS
// run boot.py and main.py if they exist.
- if (mp_import_stat("boot.py") == MP_IMPORT_STAT_FILE) {
- pyexec_file("boot.py");
- }
- if (mp_import_stat("main.py") == MP_IMPORT_STAT_FILE) {
- pyexec_file("main.py");
- }
+ pyexec_file_if_exists("boot.py");
+ pyexec_file_if_exists("main.py");
#endif
for (;;) {