Skip to content

Commit

Permalink
Update downloads.py (ultralytics#11005)
Browse files Browse the repository at this point in the history
* Update downloads.py

Signed-off-by: Glenn Jocher <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Glenn Jocher <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
glenn-jocher and pre-commit-ci[bot] authored Feb 17, 2023
1 parent 226a5e4 commit 34e1bc8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions utils/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,9 @@ def github_assets(repository, version='latest'):

file.parent.mkdir(parents=True, exist_ok=True) # make parent dir (if required)
if name in assets:
url3 = 'https://drive.google.com/drive/folders/1EFQTEUeXWSFww0luse2jB9M1QNZQGwNl' # backup gdrive mirror
safe_download(
file,
url=f'https://github.com/{repo}/releases/download/{tag}/{name}',
min_bytes=1E5,
error_msg=f'{file} missing, try downloading from https://github.com/{repo}/releases/{tag} or {url3}')
safe_download(file,
url=f'https://github.com/{repo}/releases/download/{tag}/{name}',
min_bytes=1E5,
error_msg=f'{file} missing, try downloading from https://github.com/{repo}/releases/{tag}')

return str(file)

0 comments on commit 34e1bc8

Please sign in to comment.