浏览代码

raise errors properly on UnityRegistry (#4070)

* raise errors properly

* Removin extra except

* addressing comments
/MLA-1734-demo-provider
GitHub 5 年前
当前提交
d2e2ee5c
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 12
      ml-agents-envs/mlagents_envs/registry/binary_utils.py

12
ml-agents-envs/mlagents_envs/registry/binary_utils.py


break
try:
download_and_extract_zip(url, name)
except IOError:
logger.debug(
f"Attempt {attempt + 1} / {NUMBER_ATTEMPTS} : Failed to download"
)
except Exception: # pylint: disable=W0702
if attempt + 1 < NUMBER_ATTEMPTS:
logger.warning(
f"Attempt {attempt + 1} / {NUMBER_ATTEMPTS}"
": Failed to download and extract binary."
)
else:
raise
path = get_local_binary_path_if_exists(name, url)
if path is None:

正在加载...
取消
保存