Skip to content

Commit

Permalink
Fix for python 2.4. Release 1.7.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshthecoder committed May 25, 2010
1 parent 1bfc391 commit c454e06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tweepy/__init__.py
Expand Up @@ -5,7 +5,7 @@
"""
Tweepy Twitter API library
"""
__version__ = '1.7'
__version__ = '1.7.1'
__author__ = 'Joshua Roesslein'
__license__ = 'MIT'

Expand Down
5 changes: 4 additions & 1 deletion tweepy/parsers.py
Expand Up @@ -46,7 +46,10 @@ def parse(self, method, payload):

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):
Expand Down

0 comments on commit c454e06

Please sign in to comment.