mirror of
https://github.com/litex-hub/litex-boards.git
synced 2025-01-03 03:43:36 -05:00
platforms/target: only catch ModuleNotFoundError exceptions to improve error reporting (thanks mwelling)
This commit is contained in:
parent
2a0fbcadd2
commit
4231d59901
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ class Platforms:
|
||||||
for support in ["official", "partner", "community"]:
|
for support in ["official", "partner", "community"]:
|
||||||
try:
|
try:
|
||||||
return importlib.import_module("litex_boards." + support + ".platforms." + name)
|
return importlib.import_module("litex_boards." + support + ".platforms." + name)
|
||||||
except:
|
except ModuleNotFoundError:
|
||||||
pass
|
pass
|
||||||
raise ModuleNotFoundError
|
raise ModuleNotFoundError
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Targets:
|
||||||
for support in ["official", "partner", "community"]:
|
for support in ["official", "partner", "community"]:
|
||||||
try:
|
try:
|
||||||
return importlib.import_module("litex_boards." + support + ".targets." + name)
|
return importlib.import_module("litex_boards." + support + ".targets." + name)
|
||||||
except:
|
except ModuleNotFoundError:
|
||||||
pass
|
pass
|
||||||
raise ModuleNotFoundError
|
raise ModuleNotFoundError
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue