From e810f53ebee1d95af3fc0b9725438f88224c8039 Mon Sep 17 00:00:00 2001 From: Lingkang Date: Wed, 19 Jul 2023 05:00:57 +0800 Subject: [PATCH] python: fix fatal in main.py (github #78) (#93) * python: fix fatal in main.py (github #78) Issue-On: https://github.com/gem5/gem5/issues/78 * python: fix fatal in main.py (github #78) Issue-On: https://github.com/gem5/gem5/issues/78 Change-Id: I80855b05168a067ddd7706ad9fd7e71e75bfd3b1 --------- Co-authored-by: Jason Lowe-Power --- src/python/m5/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/python/m5/main.py b/src/python/m5/main.py index ddcb024f8b..e07e9562ab 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -348,13 +348,14 @@ def interact(scope): def _check_tracing(): - import m5 import _m5.core + from .util import fatal + if _m5.core.TRACING_ON: return - m5.fatal("Tracing is not enabled. Compile with TRACING_ON") + fatal("Tracing is not enabled. Compile with TRACING_ON") def main(): @@ -369,7 +370,7 @@ def main(): from . import stats from . import trace - from .util import inform, fatal, panic, isInteractive + from .util import inform, panic, isInteractive from m5.util.terminal_formatter import TerminalFormatter options, arguments = parse_options()