aboutsummaryrefslogtreecommitdiff
path: root/std.py
diff options
context:
space:
mode:
authormryouse2022-05-10 05:19:53 +0000
committermryouse2022-05-10 05:19:53 +0000
commit8a75618be33f2c01691050111f75f1071cfac1b4 (patch)
tree47b6c1422c30681d2bff4feeabf7c5f9928d5170 /std.py
parenta195702b9f43d4646714d5bad34a446261937493 (diff)
bugfix: sys.exit should take value, not object
Diffstat (limited to 'std.py')
-rw-r--r--std.py7
1 files changed, 4 insertions, 3 deletions
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)