diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-20 11:32:04 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-20 11:32:04 -0400 |
commit | bdcec99e2971c23095ef991b81a3cf81a5d8832c (patch) | |
tree | 0356cc3e99dfb7592fa15d2158e36b696ad0e648 /termcast_server/__init__.py | |
parent | 412e8a87c02a09d69c6073125352c54ccda13a48 (diff) | |
download | python-termcast-server-bdcec99e2971c23095ef991b81a3cf81a5d8832c.tar.gz python-termcast-server-bdcec99e2971c23095ef991b81a3cf81a5d8832c.zip |
display stack traces with exceptions
Diffstat (limited to 'termcast_server/__init__.py')
-rw-r--r-- | termcast_server/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/termcast_server/__init__.py b/termcast_server/__init__.py index ca6adc0..de2af21 100644 --- a/termcast_server/__init__.py +++ b/termcast_server/__init__.py @@ -2,6 +2,7 @@ import signal import socket import sys import threading +import traceback import uuid from . import pubsub @@ -69,6 +70,7 @@ class Server(object): sock.listen(100) client, addr = sock.accept() except Exception as e: + print(traceback.format_exc()) print('*** Listen/accept failed: ' + str(e)) continue @@ -81,6 +83,7 @@ class Server(object): try: connection.run() except Exception as e: + print(traceback.format_exc()) print('Running connection failed: ' + str(e)) self.publisher.unsubscribe(connection) client.close() |