Skip to content

Commit

Permalink
Reduce risk on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vingerha committed Mar 23, 2024
1 parent ad3cd6a commit 4605048
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions custom_components/adsb_lol/adsb_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
def get_flight(self):
_LOGGER.debug ("Get flight with data: %s", self)
response = requests.get(self._url)
_LOGGER.debug ("Get flight rest output: %s", response.json())
_LOGGER.debug ("Get flight rest output: %s", response)
return response.json()

def get_point_of_interest(self):
_LOGGER.debug ("Get flight poi with data: %s", self)
response = requests.get(self._url)
_LOGGER.debug ("Get flight poi rest output: %s", response.json())
_response = []
_LOGGER.debug ("Get flight poi rest output: %s", response)
_response_h = []
aircraft = {}
aircraft_h = {}
Expand All @@ -43,8 +42,6 @@ def get_point_of_interest(self):
aircraft[CONF_ENTITY_PICTURE_ASC] = self._CONF_ENTITY_PICTURE_ASC
aircraft[CONF_ENTITY_PICTURE_DESC] = self._CONF_ENTITY_PICTURE_DESC
aircraft_h[str(self._reg)] = aircraft.copy()


_response_h = aircraft_h

_LOGGER.debug ("Get flight poi: %s", response.json())
Expand Down

0 comments on commit 4605048

Please sign in to comment.