diff --git a/py/execnet/script/socketserver.py b/py/execnet/script/socketserver.py index b886a31f4..5f7b7b3f3 100755 --- a/py/execnet/script/socketserver.py +++ b/py/execnet/script/socketserver.py @@ -68,8 +68,12 @@ def startserver(serversock, loop=False): except (KeyboardInterrupt, SystemExit): raise except: - import traceback - traceback.print_exc() + if debug: + import traceback + traceback.print_exc() + else: + excinfo = sys.exc_info() + print "got exception", excinfo[1] if not loop: break finally: