sunlightlabs/census — pull request #8 by selik (2014-03-14 00:58:16+00:00)
Title: check for invalid api key message when json fails to parse

When json.loads() raises a ValueError, the reason may be that
the submitted FCC API Key was invalid. The FCC returns a small
html page titled "Invalid Key". This change checks for that
string in the response text and raises a more useful error
than a json parsing failure. If that text is not present, it
raises the original json parsing ValueError.