Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielhiversen authored Sep 29, 2020
1 parent 3c01f75 commit a95d181
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/tractive/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ async def _fetch_tracker_data(self, tracker_id):
resp.status,
resp.reason,
)
return []
return [], None
result = await resp.json()
except aiohttp.ClientError as err:
_LOGGER.error("Error connecting to Tractives: %s ", err, exc_info=True)
raise
except asyncio.TimeoutError:
return []
return [], None

time_from = max(result["first"], result["last"] - 3600 * 24)

Expand All @@ -194,7 +194,7 @@ async def _fetch_tracker_data(self, tracker_id):
resp.status,
resp.reason,
)
return []
return [], None
result = await resp.json()
except aiohttp.ClientError as err:
_LOGGER.error("Error connecting to Tractives: %s ", err, exc_info=True)
Expand Down

0 comments on commit a95d181

Please sign in to comment.