weatherApp handle URLError

This commit is contained in:
Michael Davidsaver
2013-07-16 14:37:42 -04:00
parent 56032eee8d
commit 1d5250de31

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import socket, time
import socket, time, urllib2
from weakref import WeakValueDictionary
@ -147,11 +147,10 @@ class ReportScanner(StoppableThread):
self.lastUpdate = rtime
except socket.error, e:
except (socket.error, urllib2.URLError) as e:
print("download error for",self.station,":",e)
self.updatePeriod = self.initPeriod
self.intscan.interrupt()
#print('Waiting',self.updatePeriod)