py/builtinimport: Change relative import's ValueError to ImportError.

Following CPython change, see https://bugs.python.org/issue37444.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-05-30 19:25:53 +10:00
parent c3199f5649
commit 53519e322a
3 changed files with 11 additions and 3 deletions

View File

@@ -7,5 +7,5 @@ print(bar)
# attempted relative import beyond top-level package
try:
from .... import mod1
except ValueError:
print("ValueError")
except ImportError:
print("ImportError")