Commit 99adc4a2 authored by Matthew Hausknecht's avatar Matthew Hausknecht

Added more informative error printing

parent 0aaeed5f
...@@ -69,7 +69,8 @@ def main(args, team1='left', team2='right', rng=numpy.random.RandomState()): ...@@ -69,7 +69,8 @@ def main(args, team1='left', team2='right', rng=numpy.random.RandomState()):
server = launch(SERVER_CMD + serverOptions, name='server') server = launch(SERVER_CMD + serverOptions, name='server')
time.sleep(0.2) time.sleep(0.2)
assert server.poll() is None,\ assert server.poll() is None,\
'Failed to launch Server with command: \"%s\"'%(SERVER_CMD) '[start.py] Failed to launch Server with command: \"%s\"' \
%(SERVER_CMD + serverOptions)
if not args.headless: if not args.headless:
monitorOptions = ' --port=%i'%(server_port) monitorOptions = ' --port=%i'%(server_port)
launch(MONITOR_CMD + monitorOptions, name='monitor') launch(MONITOR_CMD + monitorOptions, name='monitor')
...@@ -91,6 +92,7 @@ def main(args, team1='left', team2='right', rng=numpy.random.RandomState()): ...@@ -91,6 +92,7 @@ def main(args, team1='left', team2='right', rng=numpy.random.RandomState()):
except KeyboardInterrupt: except KeyboardInterrupt:
print '[start.py] Exiting for CTRL-C' print '[start.py] Exiting for CTRL-C'
finally: finally:
print '[start.py] Cleaning up server and other processes'
for p in processes: for p in processes:
try: try:
p.send_signal(SIGKILL) p.send_signal(SIGKILL)
......
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