From 915d8ff8bd4d940e1a2c777c9446e7dc6985166f Mon Sep 17 00:00:00 2001 From: "Daniel G. Taylor" Date: Thu, 1 Aug 2013 15:00:42 -0700 Subject: [PATCH] Actually, we really only do need to catch ValueError. James pointed out that JSONDecodeError inherits from ValueError. Tests continue to pass. --- boto/cloudsearch/search.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/boto/cloudsearch/search.py b/boto/cloudsearch/search.py index bbac42efde..ece623a813 100644 --- a/boto/cloudsearch/search.py +++ b/boto/cloudsearch/search.py @@ -36,15 +36,6 @@ class CommitMismatchError(Exception): pass -try: - from simplejson import JSONDecodeError -except ImportError: - class FakeJSONDecodeError(Exception): - pass - - JSONDecodeError = FakeJSONDecodeError - - class SearchResults(object): def __init__(self, **attrs): self.rid = attrs['info']['rid'] @@ -299,7 +290,7 @@ def __call__(self, query): r = requests.get(url, params=params) try: data = json.loads(r.content) - except (JSONDecodeError, ValueError), e: + except ValueError, e: if r.status_code == 403: msg = '' import re