python: figure out if the m5.internal package exists even with demandimport
This commit is contained in:
parent
3c78005c1e
commit
1f7f79781e
|
@ -31,8 +31,13 @@
|
|||
# scripts while allowing new SCons code to operate properly.
|
||||
|
||||
try:
|
||||
import internal
|
||||
# Try to import something that's generated by swig
|
||||
import internal.core
|
||||
|
||||
# Try to grab something from it in case demandimport is being used
|
||||
internal.core.__package__
|
||||
except ImportError:
|
||||
# The import failed
|
||||
internal = None
|
||||
|
||||
if internal:
|
||||
|
|
Loading…
Reference in a new issue