summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-03-14 11:30:05 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-14 11:52:05 +1100
commit52f8f5666a496e17306c7cc6f53c0c14cf003a57 (patch)
treeabfb0237819d4ef778afb5e8c0b28fd1e392d78b /esp8266/main.c
parent180045bce9282c4a658284e01348f57841e39cdd (diff)
downloadmicropython-52f8f5666a496e17306c7cc6f53c0c14cf003a57.tar.gz
micropython-52f8f5666a496e17306c7cc6f53c0c14cf003a57.zip
esp8266: Update lexer constructors so they can raise exceptions.
Diffstat (limited to 'esp8266/main.c')
-rw-r--r--esp8266/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index 0099486750..fd07efcbf2 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -32,6 +32,7 @@
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
+#include "py/mperrno.h"
#include "py/mphal.h"
#include "py/gc.h"
#include "lib/mp-readline/readline.h"
@@ -111,7 +112,7 @@ void user_init(void) {
#if !MICROPY_VFS
mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
- return NULL;
+ mp_raise_OSError(MP_ENOENT);
}
mp_import_stat_t mp_import_stat(const char *path) {