Skip to content

Commit

Permalink
Cleanup on any Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Fittiboy committed Jul 1, 2021
1 parent 4d471f1 commit 15c5fc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clipper.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def dl_progress(count, block_size, total_size):
remove(fullpath)
sys.exit("Exiting...")
except Exception as e:
if isfile(fullpath):
remove(fullpath)
failed += 1
print(e)
if not isfile(base_path + "failed.txt"):
Expand Down

0 comments on commit 15c5fc2

Please sign in to comment.