From c454e06533730757403e0fa7649c5313653de90d Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Tue, 25 May 2010 10:25:53 -0500 Subject: [PATCH] Fix for python 2.4. Release 1.7.1. --- setup.py | 2 +- tweepy/__init__.py | 2 +- tweepy/parsers.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) 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): -- 2.25.1