Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Actually, we really only do need to catch ValueError. James pointed o…
Browse files Browse the repository at this point in the history
…ut that JSONDecodeError inherits from ValueError. Tests continue to pass.
  • Loading branch information
danielgtaylor committed Aug 1, 2013
1 parent 954a50c commit 915d8ff
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions boto/cloudsearch/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 915d8ff

Please sign in to comment.