mirror of https://github.com/VLSIDA/OpenRAM.git
Use for/else in custom_module_finder
This commit is contained in:
parent
b884fb36c3
commit
5fe784ab14
|
|
@ -60,14 +60,14 @@ class custom_module_finder(MetaPathFinder):
|
|||
# Skip if the package is not openram
|
||||
if package_name != "openram":
|
||||
return None
|
||||
customizable = False
|
||||
# Search for the module name in customizable modules
|
||||
from openram import OPTS
|
||||
for k, v in OPTS.__dict__.items():
|
||||
if module_name == v:
|
||||
customizable = True
|
||||
break
|
||||
else:
|
||||
return None
|
||||
# Search for the custom module
|
||||
if customizable:
|
||||
import sys
|
||||
# Try to find the module in sys.path
|
||||
for path in sys.path:
|
||||
|
|
|
|||
Loading…
Reference in New Issue