Skip to content

Conversation

@mfabinski
Copy link

fix #52 by adding the specific exception handler in the inner exception handling block.

Now the update flag works as supposed:

matthias@seth:~/git/RedditImageGrab$ python redditdl.py cats ~/Bilder/cats --num 5 --update
Downloading images from "cats" subreddit
    Attempting to download URL[http://www.explodingkittens.com/kittyconvict?2] as [3v84lg].
    WRONG FILE TYPE: http://www.explodingkittens.com/kittyconvict?2 has type: text/html!
    Attempting to download URL[http://imgur.com/98fqWq0.jpg] as [51usgy.jpg].
    URL [http://imgur.com/98fqWq0.jpg] already downloaded.
    Update complete, exiting.
Downloaded 0 files

Thanks to @rachmadaniHaryono for adding tests for the fix continue flag

@mfabinski mfabinski mentioned this pull request Sep 12, 2016
try: # py3
from mock import patch, MagicMock
except ImportError: # py2
from unittest import mock
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in this case you don't seem to have a patch function which is used later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--update flag is not working

3 participants