Remove unnecessary braces

This commit is contained in:
Ivan Habunek 2024-08-28 09:53:06 +02:00
parent f9e60082ba
commit 91e0447681
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -26,12 +26,12 @@ def _download(url: str, path: str):
def download_file(url: str, path: str, retries: int = RETRY_COUNT): def download_file(url: str, path: str, retries: int = RETRY_COUNT):
if os.path.exists(path): if os.path.exists(path):
from_disk = True from_disk = True
return (os.path.getsize(path), from_disk) return os.path.getsize(path), from_disk
from_disk = False from_disk = False
for _ in range(retries): for _ in range(retries):
try: try:
return (_download(url, path), from_disk) return _download(url, path), from_disk
except httpx.RequestError: except httpx.RequestError:
pass pass