Commit 116b4798 authored by Stefan Marr's avatar Stefan Marr

Fix implementation of std_print

And make prints robust to msg being None
Signed-off-by: default avatarStefan Marr <git@stefan-marr.de>
parent 12ce8230
...@@ -589,16 +589,16 @@ class Universe(object): ...@@ -589,16 +589,16 @@ class Universe(object):
return result return result
def error_print(msg): def error_print(msg):
os.write(2, msg) os.write(2, msg or "")
def error_println(msg = ""): def error_println(msg = ""):
os.write(2, msg + "\n") os.write(2, msg + "\n")
def std_print(msg): def std_print(msg):
print msg, os.write(1, msg or "")
def std_println(msg=""): def std_println(msg = ""):
print msg os.write(1, msg + "\n")
def main(args): def main(args):
u = Universe() u = Universe()
......
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