explicitly catch socket.timeout

master v0.11
Matthew Wall 6 years ago
parent c215b577d2
commit 4f78f1e41e

@ -42,7 +42,7 @@ import weewx.units
import weewx.wxformulas
DRIVER_NAME = 'netatmo'
DRIVER_VERSION = "0.10"
DRIVER_VERSION = "0.11"
INHG_PER_MBAR = 0.0295299830714
MPH_TO_KPH = 1.60934
@ -317,7 +317,7 @@ class CloudClient(Collector):
try:
CloudClient.get_data(self._sd, self._device_id)
break
except (urllib2.HTTPError, urllib2.URLError), e:
except (socket.error, socket.timeout, urllib2.HTTPError, urllib2.URLError), e:
logerr("failed attempt %s of %s to get data: %s" %
(tries + 1, self._max_tries, e))
logdbg("waiting %s seconds before retry" %

@ -1,3 +1,6 @@
0.11 08jul2018
* explicitly catch socket timeouts since URLError does not in python 2.7
0.10 30mar2017
* fix rain conversions

@ -10,7 +10,7 @@ def loader():
class NetatmoInstaller(ExtensionInstaller):
def __init__(self):
super(NetatmoInstaller, self).__init__(
version="0.10",
version="0.11",
name='netatmo',
description='Driver for netatmo weather stations.',
author="Matthew Wall",

Loading…
Cancel
Save