VCR YR sensor test
This commit is contained in:
1 parent
ca6b957839
commit
c1eaf60461
5 files changed
+49
-42
No files matched your search
@@ -206,7 +206,8 @@ class YrData(object):
|
||||
if self._nextrun is not None and dt_util.utcnow() <= self._nextrun:
|
||||
return
|
||||
try:
|
||||
response = requests.get(self._url)
|
||||
with requests.Session() as sess:
|
||||
response = sess.get(self._url)
|
||||
except requests.RequestException:
|
||||
return
|
||||
if response.status_code != 200:
|
||||
|
||||
Reference in new issue
Block a user