From 8a75618be33f2c01691050111f75f1071cfac1b4 Mon Sep 17 00:00:00 2001 From: mryouse Date: Tue, 10 May 2022 05:19:53 +0000 Subject: bugfix: sys.exit should take value, not object --- std.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'std.py') diff --git a/std.py b/std.py index 6f591fc..1779b49 100644 --- a/std.py +++ b/std.py @@ -10,9 +10,10 @@ DEBUG = True def _get_debug(): return DEBUG -def std_exit(status=0): - sys.exit(status) - return NebLiteral(NebType.BOOL, True) +def std_exit(status=None): + out = 0 if status is None else status.value + sys.exit(out) + return NebLiteral(NebType.BOOL, True) # this should never be reached def std_print(arg): print(arg.value) -- cgit v1.2.3