diff options
author | Nathan Binkert <nate@binkert.org> | 2011-04-15 10:37:28 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2011-04-15 10:37:28 -0700 |
commit | 1f7f79781e5ec6ca619d4c2075305e3bead88c90 (patch) | |
tree | bb894d50d0f3a36ae37b11483c5a019a46e70b8a | |
parent | 3c78005c1e0bfc070ff21bfc145eb250eda71b7a (diff) | |
download | gem5-1f7f79781e5ec6ca619d4c2075305e3bead88c90.tar.xz |
python: figure out if the m5.internal package exists even with demandimport
-rw-r--r-- | src/python/m5/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py index 9f9459ae8..b5af7a80f 100644 --- 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: |