WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 3faa13ab authored by Stefan Marr's avatar Stefan Marr
Browse files

Added work-around for use of exit()

- the same as for SOM and TruffleSOM
Signed-off-by: default avatarStefan Marr <git@stefan-marr.de>
parent c524f892
......@@ -22,7 +22,7 @@ import sys
class Universe(object):
def __init__(self):
def __init__(self, avoid_exit = False):
self._interpreter = Interpreter(self)
self._symbol_table = SymbolTable()
......@@ -49,6 +49,7 @@ class Universe(object):
self._doubleClass = None
self._last_exit_code = 0
self._avoid_exit = avoid_exit
self._classpath = None
self._dump_bytecodes = False
......@@ -124,6 +125,15 @@ class Universe(object):
def metaclassClass(self):
return self._metaclassClass
def exit(self, error_code):
if self._avoid_exit:
self._last_exit_code = error_code
def last_exit_code(self):
return self._last_exit_code
def get_interpreter(self):
return self._interpreter
......@@ -28,7 +28,7 @@ class SomTest(unittest.TestCase):
("Vector" ,)])
def test_som_test(self, test_name):
args = ["-cp", "Smalltalk", "TestSuite/TestHarness.som", test_name]
u = Universe()
u = Universe(True)
self.assertEquals(0, u.last_exit_code)
self.assertEquals(0, u.last_exit_code())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment