minor fixes and cleanups

This commit is contained in:
The MMGen Project 2022-02-06 13:28:44 +00:00
commit 71d7986391
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
13 changed files with 48 additions and 40 deletions

View file

@ -272,7 +272,8 @@ if __name__ == '__main__':
code = create_src( proto, solidity_code_template, token_data, cmd_args[0] )
if opt.preprocess:
Die(0,code)
Msg(code)
sys.exit(0)
out = compile_code(code)

View file

@ -44,6 +44,10 @@ def exec_wrapper_write_traceback(e):
if exc.startswith('SystemExit:'):
lines.pop()
if os.getenv('MMGEN_TEST_SUITE_DETERMINISTIC'):
pat = re.compile(", line [0-9]+,")
lines = [pat.sub(", line (scrubbed),",line) for line in lines]
c = exec_wrapper_get_colors()
message = ( repr(e) if type(e).__name__ in ('MMGenError','MMGenSystemExit') else exc )
sys.stdout.write('{}{}'.format(