Skip to content
Permalink
Browse files

Merge b8873e5 into 82a19cb

  • Loading branch information
akrejcir committed Dec 3, 2019
2 parents 82a19cb + b8873e5 commit 00b75380948b857af93c943b47a41ea7a088885e
Showing with 5 additions and 5 deletions.
  1. +5 −3 lib/utils/pyexec.c
  2. +0 −2 ports/nrf/main.c
@@ -547,10 +547,12 @@ int pyexec_file_if_exists(const char *filename) {
return pyexec_frozen_module(filename);
}
#endif
if (mp_import_stat(filename) != MP_IMPORT_STAT_FILE) {
return 1; // success (no file is the same as an empty file executing without fail)
#if MICROPY_VFS || MICROPY_MBFS
if (mp_import_stat(filename) == MP_IMPORT_STAT_FILE) {
return pyexec_file(filename);
}
return pyexec_file(filename);
#endif
return 1; // success (no file is the same as an empty file executing without fail)
}

#if MICROPY_MODULE_FROZEN
@@ -230,11 +230,9 @@ pin_init0();

led_state(1, 0);

#if MICROPY_VFS || MICROPY_MBFS
// run boot.py and main.py if they exist.
pyexec_file_if_exists("boot.py");
pyexec_file_if_exists("main.py");
#endif

#if MICROPY_HW_USB_CDC
usb_cdc_init();

0 comments on commit 00b7538

Please sign in to comment.
You can’t perform that action at this time.