changeset 95fe5c720cfa in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=95fe5c720cfa
description:
python: figure out if the m5.internal package exists even with
demandimport
diffstat:
src/python/m5/__init__.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 8b5f900233ee -r 95fe5c720cfa src/python/m5/__init__.py
--- a/src/python/m5/__init__.py Wed Apr 13 09:32:19 2011 -0700
+++ b/src/python/m5/__init__.py Fri Apr 15 10:37:28 2011 -0700
@@ -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:
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev