projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c78005
)
python: figure out if the m5.internal package exists even with demandimport
author
Nathan Binkert
<nate@binkert.org>
Fri, 15 Apr 2011 17:37:28 +0000
(10:37 -0700)
committer
Nathan Binkert
<nate@binkert.org>
Fri, 15 Apr 2011 17:37:28 +0000
(10:37 -0700)
src/python/m5/__init__.py
patch
|
blob
|
history
diff --git
a/src/python/m5/__init__.py
b/src/python/m5/__init__.py
index 9f9459ae8b80b8dd8253cfadb7d19a7d8e5870d0..b5af7a80fe24a7dddefed1d2e3369ce1d4670359 100644
(file)
--- a/
src/python/m5/__init__.py
+++ b/
src/python/m5/__init__.py
@@
-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: