michaelhelmick/python-tumblpy — pull request #10 by mkai (2012-10-18 13:45:33+00:00)
Title: Handle empty/ 404 responses

The Tumblr API returns and empty list (and not a dict) in some cases, e. g. if a blog was not found (404). In these case, calling content.get() raises an AttributeError. This commit fixes it.

Example for a 404 response:
http://api.tumblr.com/v2/blog/cocofuckedchanel.tumblr.com/posts/