Add retry option to get_github_assets() function (#4148)
This commit is contained in:
parent
11d0488bf1
commit
09a0378e81
4 changed files with 41 additions and 33 deletions
|
|
@ -422,7 +422,7 @@ class Exporter:
|
|||
f'{prefix} WARNING ⚠️ PNNX not found. Attempting to download binary file from '
|
||||
'https://github.com/pnnx/pnnx/.\nNote PNNX Binary file must be placed in current working directory '
|
||||
f'or in {ROOT}. See PNNX repo for full installation instructions.')
|
||||
_, assets = get_github_assets(repo='pnnx/pnnx')
|
||||
_, assets = get_github_assets(repo='pnnx/pnnx', retry=True)
|
||||
asset = [x for x in assets if ('macos' if MACOS else 'ubuntu' if LINUX else 'windows') in x][0]
|
||||
attempt_download_asset(asset, repo='pnnx/pnnx', release='latest')
|
||||
unzip_dir = Path(asset).with_suffix('')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue