python: cleanup python code so stuff doesn't automatically happen at startup

this allows things to be overridden at startup (e.g. for tests)
This commit is contained in:
Nathan Binkert
2011-04-15 10:44:59 -07:00
parent 3182913e94
commit 8c97726266
4 changed files with 119 additions and 91 deletions

View File

@@ -36,7 +36,6 @@ import sys
import internal
import core
import stats
from main import options
import SimObject
import ticks
import objects
@@ -48,6 +47,8 @@ MaxTick = 2**63 - 1
# The final hook to generate .ini files. Called from the user script
# once the config is built.
def instantiate(ckpt_dir=None):
from main import options
root = objects.Root.getInstance()
if not root: