summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorPierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>2017-02-23 10:12:05 +0100
committerPierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>2017-03-01 14:21:56 +0000
commitf3e0ac2b063e39924c1b31d3ec83a0bf0c43fdfd (patch)
tree56ee8e4ef55f12ced560fab9b89d60062a73f10e /configs
parentefcd8ae0244ec2791b58c749815c2f7a835eb78f (diff)
downloadgem5-f3e0ac2b063e39924c1b31d3ec83a0bf0c43fdfd.tar.xz
config: exit with fatal() if error
If output redirection is activated, the error message is printed in simout. This change ensure it will be printed in simerr. Change-Id: Ie661ac6b6978bf2e4aaaccdf23134795d764d459 Signed-off-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr> Reviewed-on: https://gem5-review.googlesource.com/2221 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'configs')
-rw-r--r--configs/common/PlatformConfig.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/configs/common/PlatformConfig.py b/configs/common/PlatformConfig.py
index 3541c07fb..e2589c058 100644
--- a/configs/common/PlatformConfig.py
+++ b/configs/common/PlatformConfig.py
@@ -1,6 +1,8 @@
# Copyright (c) 2012, 2015 ARM Limited
# All rights reserved.
#
+# Copyright (c) 2017, Centre National de la Recherche Scientifique (CNRS)
+#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
@@ -34,10 +36,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Andreas Sandberg
+# Pierre-Yves Peneau
import m5.objects
import inspect
import sys
+from m5.util import fatal
from textwrap import TextWrapper
# Dictionary of mapping names of real CPU models to classes.
@@ -74,8 +78,7 @@ def get(name):
try:
return _platform_classes[real_name]
except KeyError:
- print "%s is not a valid Platform model." % (name,)
- sys.exit(1)
+ fatal("%s is not a valid Platform model." % (name,))
def print_platform_list():
"""Print a list of available Platform classes including their aliases."""