diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-02-09 13:41:53 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-02-09 13:41:53 -0500 |
commit | 89ba024b9843719bf06a9c3efaaf1b137dee2a12 (patch) | |
tree | 9965628330d04910f7574e5920d463ac1117aa59 /sim | |
parent | 6eaa4d3571e340598a2ddd03c8479d0bc993bde2 (diff) | |
download | gem5-89ba024b9843719bf06a9c3efaaf1b137dee2a12.tar.xz |
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
Diffstat (limited to 'sim')
-rw-r--r-- | sim/pyconfig/m5config.py | 5 |
1 files changed, 3 insertions, 2 deletions
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): |