Skip to content

Commit

Permalink
Fix --update, the outer block already catches all Exception (closes H…
Browse files Browse the repository at this point in the history
  • Loading branch information
infinity0 committed Oct 24, 2017
1 parent eb23ee5 commit 53078cf
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions redditdownload/redditdownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,16 +442,11 @@ def main():
print(text_templ.format(URL.encode('utf-8'), FILENAME.encode('utf-8')))

# Download the image
try:
download_from_url(URL, FILEPATH)
# Image downloaded successfully!
print(' Sucessfully downloaded URL [%s] as [%s].' % (URL, FILENAME))
DOWNLOADED += 1
FILECOUNT += 1

except Exception as exc:
print(' %s' % (exc,))
ERRORS += 1
download_from_url(URL, FILEPATH)
# Image downloaded successfully!
print(' Sucessfully downloaded URL [%s] as [%s].' % (URL, FILENAME))
DOWNLOADED += 1
FILECOUNT += 1

if ARGS.num and DOWNLOADED >= ARGS.num:
FINISHED = True
Expand Down

0 comments on commit 53078cf

Please sign in to comment.