'Wrapper to get the latest PyPI version (async)
The data are stored in a cached file
Only update online once a week'

def get_pypi_version(self):

    if self.args.disable_check_update:
        return
    cached_data = self._load_cache()
    if (cached_data == {}):
        thread = threading.Thread(target=self._update_pypi_version)
        thread.start()
    else:
        self.data['latest_version'] = cached_data['latest_version']
        logger.debug('Get    Glances    version    from    cache    file')
