mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
py/builtinimport: Raise ValueError for bad relative import, per CPython.
This commit is contained in:
@@ -7,5 +7,5 @@ print(bar)
|
||||
# whereas CPython raises a ValueError
|
||||
try:
|
||||
from .... import mod1
|
||||
except (ImportError, ValueError):
|
||||
print('Error')
|
||||
except ValueError:
|
||||
print('ValueError')
|
||||
|
||||
Reference in New Issue
Block a user