From: Nathan Binkert Date: Wed, 9 Feb 2005 18:41:53 +0000 (-0500) Subject: Fix the panic message so that it looks more like M5's panic. X-Git-Tag: m5_1.0_tutorial~93^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89ba024b9843719bf06a9c3efaaf1b137dee2a12;p=gem5.git 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 --- diff --git a/sim/pyconfig/m5config.py b/sim/pyconfig/m5config.py index c9bfdab54..bbd437b30 100644 --- a/sim/pyconfig/m5config.py +++ b/sim/pyconfig/m5config.py @@ -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):