From: Josh Roesslein Date: Wed, 14 Oct 2009 19:09:33 +0000 (-0500) Subject: Fix error message reporting. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=240d697f378f85271278c47640d3328996db606e;p=tweepy.git Fix error message reporting. --- diff --git a/tweepy/binder.py b/tweepy/binder.py index 9097d75..3bf1bf5 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -125,7 +125,7 @@ def bind_api(path, parser, allowed_param=[], method='GET', require_auth=False, api.last_response = resp if resp.status != 200: try: - error_msg = parse_error(resp.read()) + error_msg = parse_error(json.loads(resp.read())) except Exception: error_msg = "Twitter error response: status code = %s" % resp.status raise TweepError(error_msg)