use sys.exit() not exit()
exit() is meant to be a helper in interactive repls and won't work if python is started with -S in a script https://stackoverflow.com/questions/6501121/difference-between-exit-and-sys-exit-in-python
This commit is contained in:
parent
9de9851d5a
commit
24f48d716e
|
@ -315,7 +315,7 @@ def check_env() -> None:
|
||||||
# make sure that sourceme-f1 was sourced
|
# make sure that sourceme-f1 was sourced
|
||||||
if os.environ.get('FIRESIM_SOURCED') is None:
|
if os.environ.get('FIRESIM_SOURCED') is None:
|
||||||
rootLogger.critical("ERROR: You must source firesim/sourceme-f1-manager.sh!")
|
rootLogger.critical("ERROR: You must source firesim/sourceme-f1-manager.sh!")
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
|
@ -395,4 +395,4 @@ if __name__ == '__main__':
|
||||||
exitcode = 1
|
exitcode = 1
|
||||||
finally:
|
finally:
|
||||||
rootLogger.info("""The full log of this run is:\n{basedir}/{fulllog}""".format(basedir=dname, fulllog=full_log_filename))
|
rootLogger.info("""The full log of this run is:\n{basedir}/{fulllog}""".format(basedir=dname, fulllog=full_log_filename))
|
||||||
exit(exitcode)
|
sys.exit(exitcode)
|
||||||
|
|
|
@ -18,6 +18,7 @@ from runtools.workload import WorkloadConfig
|
||||||
from runtools.run_farm import RunFarm
|
from runtools.run_farm import RunFarm
|
||||||
from util.streamlogger import StreamLogger
|
from util.streamlogger import StreamLogger
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
LOCAL_DRIVERS_BASE = "../sim/output/f1/"
|
LOCAL_DRIVERS_BASE = "../sim/output/f1/"
|
||||||
LOCAL_DRIVERS_GENERATED_SRC = "../sim/generated-src/f1/"
|
LOCAL_DRIVERS_GENERATED_SRC = "../sim/generated-src/f1/"
|
||||||
|
@ -209,7 +210,7 @@ class RuntimeHWConfig:
|
||||||
if localcap.failed:
|
if localcap.failed:
|
||||||
rootLogger.info("FPGA software driver build failed. Exiting. See log for details.")
|
rootLogger.info("FPGA software driver build failed. Exiting. See log for details.")
|
||||||
rootLogger.info("""You can also re-run '{}' in the 'firesim/sim' directory to debug this error.""".format(driverbuildcommand))
|
rootLogger.info("""You can also re-run '{}' in the 'firesim/sim' directory to debug this error.""".format(driverbuildcommand))
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
self.driver_built = True
|
self.driver_built = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue