From 8d9cc2e6695c5982222c75560a95899cc3aaa044 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 30 Mar 2014 02:31:08 +0200 Subject: [PATCH] compile: Print error messages on unimplemented relative imports. --- py/compile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/compile.c b/py/compile.c index 0e33ca2688..f475979d11 100644 --- a/py/compile.c +++ b/py/compile.c @@ -1261,11 +1261,13 @@ void do_import_name(compiler_t *comp, mp_parse_node_t pn, qstr *q1, qstr *q2) { } else { // TODO not implemented // This covers relative imports starting with dot(s) like "from .foo import" + compile_syntax_error(comp, "Relative imports not implemented"); assert(0); } } else { // TODO not implemented // This covers relative imports with dots only like "from .. import" + compile_syntax_error(comp, "Relative imports not implemented"); assert(0); } }