Skip to content

Commit

Permalink
don't raise error on final
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Nov 16, 2023
1 parent ef087d2 commit 5cbccdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ofscraper/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ async def inner(c,ele,path,username,model_id,progress,total):
try:
await fileobject.close()
except Exception as E:
raise E
None


total=int(data.get("content-length")) if data else None
Expand Down Expand Up @@ -615,7 +615,7 @@ async def inner(item,c,ele,progress):
try:
await fileobject.close()
except Exception as E:
raise E
None
return await inner(item,c,ele,progress)


Expand Down
4 changes: 2 additions & 2 deletions ofscraper/utils/downloadbatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ async def inner(c,ele,path,username,model_id,total):
try:
await fileobject.close()
except Exception as E:
raise E
None

total=int(data.get("content-length")) if data else None
return await inner(c,ele,path,username,model_id,total)
Expand Down Expand Up @@ -790,7 +790,7 @@ async def inner(item,c,ele):
try:
await fileobject.close()
except Exception as E:
raise E
raise None

return await inner(item,c,ele)

Expand Down

0 comments on commit 5cbccdb

Please sign in to comment.