From 4f29b315a6900445d2139652914f81168763816f Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Mon, 6 Mar 2017 17:41:34 +1100
Subject: [PATCH] esp8266: Only execute main.py if in friendly REPL mode.

---
 esp8266/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/esp8266/main.c b/esp8266/main.c
index fd07efcbf..888e58970 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -65,7 +65,9 @@ STATIC void mp_reset(void) {
 #if MICROPY_MODULE_FROZEN
     pyexec_frozen_module("_boot.py");
     pyexec_file("boot.py");
-    pyexec_file("main.py");
+    if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
+        pyexec_file("main.py");
+    }
 #endif
 }
 
-- 
GitLab