From: Joshua Roesslein Date: Tue, 25 May 2010 15:25:53 +0000 (-0500) Subject: Fix for python 2.4. Release 1.7.1. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c454e06533730757403e0fa7649c5313653de90d;p=tweepy.git Fix for python 2.4. Release 1.7.1. --- diff --git a/setup.py b/setup.py index b4ca58d..7a80aa3 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name="tweepy", - version="1.7", + version="1.7.1", description="Twitter library for python", license="MIT", author="Joshua Roesslein", diff --git a/tweepy/__init__.py b/tweepy/__init__.py index 724ed14..9ee3217 100644 --- a/tweepy/__init__.py +++ b/tweepy/__init__.py @@ -5,7 +5,7 @@ """ Tweepy Twitter API library """ -__version__ = '1.7' +__version__ = '1.7.1' __author__ = 'Joshua Roesslein' __license__ = 'MIT' diff --git a/tweepy/parsers.py b/tweepy/parsers.py index 22b3026..9ab3704 100644 --- a/tweepy/parsers.py +++ b/tweepy/parsers.py @@ -46,7 +46,10 @@ class JSONParser(Parser): def parse_error(self, payload): error = self.json_lib.loads(payload) - return error['error'] if error.has_key('error') else error['errors'] + if error.has_key('error'): + return error['error'] + else: + return error['errors'] class ModelParser(JSONParser):