hassio/updater.py
async def fetch_data(self):
        """Fetch current versions from Github.

        Is a coroutine.
        """
        url = URL_HASSIO_VERSION.format(channel=self.channel)
        machine = self.sys_machine or "default"
        board = self.sys_hassos.board

        try:
            _LOGGER.info("Fetch update data from %s", url)
            async with self.sys_websession.get(url, timeout=10) as request:
                data = await request.json(content_type=None)

        except (aiohttp.ClientError, asyncio.TimeoutError) as err:
            _LOGGER.warning("Can't fetch versions from %s: %s", url, err)
            raise HassioUpdaterError() from None

        except json.JSONDecodeError as err:
            _LOGGER.warning("Can't parse versions from %s: %s", url, err)
            raise HassioUpdaterError() from None

        # data valid?
        if not data or data.get(ATTR_CHANNEL) != self.channel:
            _LOGGER.warning("Invalid data from %s", url)
            raise HassioUpdaterError() from None

        try:
            # update supervisor version
            self._data[ATTR_HASSIO] = data["supervisor"]
            self._data[ATTR_DNS] = data["dns"]

            # update Home Assistant version
            self._data[ATTR_HOMEASSISTANT] = data["homeassistant"][machine]

            # update hassos version
            if self.sys_hassos.available and board:
                self._data[ATTR_HASSOS] = data["hassos"][board]
                self._data[ATTR_HASSOS_CLI] = data["hassos-cli"]

        except KeyError as err:
            _LOGGER.warning("Can't process version data: %s", err)
            raise HassioUpdaterError() from None

        else:
            self.save_data()
Fetch current versions from Github.

        Is a coroutine.
        
Fetch current versions from Github.
Is a coroutine.
Fetch current versions from Github . Is a coroutine .
async def fetch_data(self):
        url = URL_HASSIO_VERSION.format(channel=self.channel)
        machine = self.sys_machine or "default"
        board = self.sys_hassos.board
        try:
            _LOGGER.info("Fetch update data from %s", url)
            async with self.sys_websession.get(url, timeout=10) as request:
                data = await request.json(content_type=None)
        except (aiohttp.ClientError, asyncio.TimeoutError) as err:
            _LOGGER.warning("Can't fetch versions from %s: %s", url, err)
            raise HassioUpdaterError() from None
        except json.JSONDecodeError as err:
            _LOGGER.warning("Can't parse versions from %s: %s", url, err)
            raise HassioUpdaterError() from None
        if not data or data.get(ATTR_CHANNEL) != self.channel:
            _LOGGER.warning("Invalid data from %s", url)
            raise HassioUpdaterError() from None
        try:
            self._data[ATTR_HASSIO] = data["supervisor"]
            self._data[ATTR_DNS] = data["dns"]
            self._data[ATTR_HOMEASSISTANT] = data["homeassistant"][machine]
            if self.sys_hassos.available and board:
                self._data[ATTR_HASSOS] = data["hassos"][board]
                self._data[ATTR_HASSOS_CLI] = data["hassos-cli"]
        except KeyError as err:
            _LOGGER.warning("Can't process version data: %s", err)
            raise HassioUpdaterError() from None
        else:
            self.save_data()
async def fetch_data ( self ) : url = URL_HASSIO_VERSION . format ( channel = self . channel ) machine = self . sys_machine or "default" board = self . sys_hassos . board try : _LOGGER . info ( "Fetch update data from %s" , url ) async with self . sys_websession . get ( url , timeout = 10 ) as request : data = await request . json ( content_type = None ) except ( aiohttp . ClientError , asyncio . TimeoutError ) as err : _LOGGER . warning ( "Can't fetch versions from %s: %s" , url , err ) raise HassioUpdaterError ( ) from None except json . JSONDecodeError as err : _LOGGER . warning ( "Can't parse versions from %s: %s" , url , err ) raise HassioUpdaterError ( ) from None if not data or data . get ( ATTR_CHANNEL ) != self . channel : _LOGGER . warning ( "Invalid data from %s" , url ) raise HassioUpdaterError ( ) from None try : self . _data [ ATTR_HASSIO ] = data [ "supervisor" ] self . _data [ ATTR_DNS ] = data [ "dns" ] self . _data [ ATTR_HOMEASSISTANT ] = data [ "homeassistant" ] [ machine ] if self . sys_hassos . available and board : self . _data [ ATTR_HASSOS ] = data [ "hassos" ] [ board ] self . _data [ ATTR_HASSOS_CLI ] = data [ "hassos-cli" ] except KeyError as err : _LOGGER . warning ( "Can't process version data: %s" , err ) raise HassioUpdaterError ( ) from None else : self . save_data ( )
Fetch current versions from Github.
Fetch current versions from Github .
"""Fetch current versions from Github.

        Is a coroutine.
        """ # data valid? # update supervisor version # update Home Assistant version # update hassos version
self