Stream errors are printed with full traceback

The stream will now properly print the traceback of an error if the
debuging variable is set.
This commit is contained in:
Alexander Hirsch 2019-06-03 17:42:26 -07:00
parent 0ea4969393
commit 9f371fe86b

View File

@ -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)