commit
d230bdc4a9
@ -7,6 +7,7 @@ import sys
|
|||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
import traceback
|
||||||
|
|
||||||
if (sys.version_info > (3, 0)):
|
if (sys.version_info > (3, 0)):
|
||||||
PY_VERSION = 3
|
PY_VERSION = 3
|
||||||
@ -269,7 +270,16 @@ class BaseClient(Thread):
|
|||||||
|
|
||||||
time.sleep(0.001)
|
time.sleep(0.001)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Unexpected Error:", e)
|
|
||||||
|
# Provides the user an option to supply the environment
|
||||||
|
# variable PYMODES_DEBUG to halt the execution
|
||||||
|
# for debugging purposes
|
||||||
|
debug_intent = os.environ.get('PYMODES_DEBUG', None)
|
||||||
|
if debug_intent.lower() == 'true':
|
||||||
|
traceback.print_exc()
|
||||||
|
sys.exit()
|
||||||
|
else:
|
||||||
|
print("Unexpected Error:", e)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sock = self.connect()
|
sock = self.connect()
|
||||||
|
Loading…
Reference in New Issue
Block a user