From 9f371fe86b6483d1d60fc67aa6d74436bcf4a6f8 Mon Sep 17 00:00:00 2001 From: Alexander Hirsch Date: Mon, 3 Jun 2019 17:42:26 -0700 Subject: [PATCH] Stream errors are printed with full traceback The stream will now properly print the traceback of an error if the debuging variable is set. --- pyModeS/extra/tcpclient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyModeS/extra/tcpclient.py b/pyModeS/extra/tcpclient.py index 8969f9c..e8d15d0 100644 --- a/pyModeS/extra/tcpclient.py +++ b/pyModeS/extra/tcpclient.py @@ -7,6 +7,7 @@ import sys import socket import time from threading import Thread +import traceback if (sys.version_info > (3, 0)): PY_VERSION = 3 @@ -275,7 +276,7 @@ class BaseClient(Thread): # for debugging purposes debug_intent = os.environ.get('PYMODES_DEBUG', None) if debug_intent.lower() == 'true': - print(sys.exc_info()) + traceback.print_exc() sys.exit() else: print("Unexpected Error:", e)