fixes #12 - exit program with code from cpu.exit_code
This commit is contained in:
parent
761799c17a
commit
0c39a9eefb
@ -121,9 +121,10 @@ if __name__ == '__main__':
|
||||
|
||||
# launch the last loaded program
|
||||
cpu.launch(cpu.mmu.programs[-1], verbose=cfg.verbosity > 1)
|
||||
sys.exit(cpu.exit_code)
|
||||
|
||||
except RiscemuBaseException as e:
|
||||
print("Error: {}".format(e.message()))
|
||||
e.print_stacktrace()
|
||||
|
||||
sys.exit(1)
|
||||
sys.exit(-1)
|
||||
|
@ -1,3 +1,5 @@
|
||||
import sys
|
||||
|
||||
from riscemu import RunConfig
|
||||
from riscemu.types import InstructionMemorySection, SimpleInstruction, Program
|
||||
|
||||
@ -22,3 +24,5 @@ if __name__ == '__main__':
|
||||
cpu.setup_stack()
|
||||
|
||||
cpu.launch(program)
|
||||
|
||||
sys.exit(cpu.exit_code)
|
||||
|
Loading…
Reference in New Issue
Block a user