in bonsaicli2/bonsai_cli/utils.py [0:0]
def _get_version_result(self, wait: bool):
if wait:
timeout = None
else:
timeout = self._GIVE_UP_TIME_SECONDS
pypi_version = None
err = None
try:
pypi_version = self._result.get(timeout)
except multiprocessing.TimeoutError:
log.debug("CLI version check has not completed")
except requests.exceptions.SSLError as e:
err = e
except requests.exceptions.RequestException as e:
err = e
except (decoder.JSONDecodeError, KeyError) as e:
err = e
return pypi_version, err