Skip to content

Commit

Permalink
Replaced JSONDecodeError with ValueError tosupport older simplejson
Browse files Browse the repository at this point in the history
  • Loading branch information
k-popov committed Mar 21, 2015
1 parent 3cb9560 commit 540c5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apt_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_json_from_api(api_request=None):
logging.debug("Converting reply from %s into dict", api_request)
try:
reply_dict = reply.json()
except simplejson.scanner.JSONDecodeError:
except ValueError:
logging.error("Reply from %s is not a valid JSON", api_request)
return None
return reply_dict
Expand Down

0 comments on commit 540c5b5

Please sign in to comment.