More configuration fixes

sim/pyconfig/m5config.py:
    put panic, AddToPath, and Import here so they're always available.

--HG--
extra : convert_revision : 104dba5ccac0d64479b4109d477b5192c4b07a6e
This commit is contained in:
Nathan Binkert
2005-01-18 15:28:34 -05:00
parent cae9210dce
commit d728d44b55

View File

@@ -35,6 +35,19 @@ def defined(key):
def define(key, value = True):
env[key] = value
def panic(*args, **kwargs):
sys.exit(*args, **kwargs)
def AddToPath(path):
path = os.path.realpath(path)
if os.path.isdir(path):
sys.path.append(path)
def Import(path):
AddToPath(os.path.dirname(path))
exec('from m5config import *')
mpy_exec(file(path, 'r'))
def issequence(value):
return isinstance(value, tuple) or isinstance(value, list)