Fix the panic message so that it looks more like M5's panic.

Make it so the same path is not added to the system path twice.

--HG--
extra : convert_revision : fe18db38cc4e335ad3525a364e9f8faf62b60e52
This commit is contained in:
Nathan Binkert 2005-02-09 13:41:53 -05:00
parent 6eaa4d3571
commit 89ba024b98

View file

@ -36,11 +36,12 @@ env = {}
env.update(os.environ)
def panic(*args, **kwargs):
sys.exit(*args, **kwargs)
print >>sys.stderr, 'panic:', string
sys.exit(1)
def AddToPath(path):
path = os.path.realpath(path)
if os.path.isdir(path):
if os.path.isdir(path) and path not in sys.path:
sys.path.append(path)
def Import(path):