prints errors if they occur

This commit is contained in:
Patrick McDonagh
2016-05-20 10:58:32 -05:00
parent 7436996f7d
commit f521804072

View File

@@ -17,6 +17,7 @@ from device_base import deviceBase
from pycomm.ab_comm.clx import Driver as ClxDriver
import logging
from collections import deque
import traceback
import requests
try:
@@ -26,7 +27,7 @@ except:
import calendar
data_source = "PLC"
plc_ip = '192.168.1.10'
plc_ip = '192.168.1.20'
def readTag(addr, tag):
@@ -322,6 +323,7 @@ class start(threading.Thread, deviceBase):
except Exception, e:
sleep_timer = 20
print "Error during {0} of run loop: {1}\nWill try again in {2} seconds...".format(runLoopStatus, e, sleep_timer)
traceback.print_exc()
time.sleep(sleep_timer)
def checkStatus(self):