From 4d0dc4b2985f0da924011b20706c6a99e52f17d2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 31 Aug 2017 12:27:50 -0700 Subject: [PATCH] py: Add temporary expanded mpy mismatch message for switch to 2.0.0. (#218) Fixes #214 --- py/persistentcode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/py/persistentcode.c b/py/persistentcode.c index 2fa8c1df07..fac512fb43 100644 --- a/py/persistentcode.c +++ b/py/persistentcode.c @@ -216,7 +216,9 @@ mp_raw_code_t *mp_raw_code_load(mp_reader_t *reader) { || header[1] != MPY_VERSION || header[2] != MPY_FEATURE_FLAGS || header[3] > mp_small_int_bits()) { - mp_raise_ValueError("incompatible .mpy file"); + // TODO(tannewt): Restore the generic error after we move folks to 2.0.0. + // mp_raise_ValueError("incompatible .mpy file"); + mp_raise_ValueError("Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info."); } mp_raw_code_t *rc = load_raw_code(reader); reader->close(reader->data);