weatherApp: error handling

This commit is contained in:
Michael Davidsaver
2015-01-04 12:25:59 -05:00
parent 89b411990a
commit 8564630595
2 changed files with 6 additions and 2 deletions

View File

@ -15,3 +15,7 @@ dbLoadRecords("db/weather.db","P=CF:Ext{UNNT},LOC=UNNT")
iocInit() iocInit()
dbl > weather.dbl dbl > weather.dbl
system "cp weather.dbl /cf-update/${HOSTNAME}.${IOCNAME}.dbl"
# Start Reference tracker
py "from devsup import disect; disect.periodic(10)"

View File

@ -129,7 +129,7 @@ class ReportScanner(StoppableThread):
rtime = iso2sec(report.getISOTime()) rtime = iso2sec(report.getISOTime())
report._updatetime = rtime report._updatetime = rtime
print('update',report.getISOTime(),rtime,self.lastUpdate) #print('update',report.getISOTime(),rtime,self.lastUpdate)
if self.lastUpdate is not None: if self.lastUpdate is not None:
if self.lastUpdate >= rtime: if self.lastUpdate >= rtime:
@ -147,7 +147,7 @@ class ReportScanner(StoppableThread):
self.lastUpdate = rtime self.lastUpdate = rtime
except (socket.error, urllib2.URLError) as e: except Exception as e:
print("download error for",self.station,":",e) print("download error for",self.station,":",e)
self.updatePeriod = self.initPeriod self.updatePeriod = self.initPeriod