Skip to content

Commit

Permalink
close issue ckoepp#10
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoepp committed Aug 22, 2013
1 parent 1f5ebb1 commit 2bf8b01
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change history
**************

0.78.3
######

* fixed a bug (issue #10): min() with lambda-function doesn't work with empty responses

0.78.2
######
Expand Down
3 changes: 2 additions & 1 deletion TwitterSearch/TwitterSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def sentSearch(self, url):
self.__statistics['tweets'] += len(self.__response['content']['statuses'])

# if we've seen the correct amount of tweets there may be some more
if int(self.__response['content']['search_metadata']['count']) == given_count:
if len(self.__response['content']) > 0 and
int(self.__response['content']['search_metadata']['count']) == given_count:
self.__nextMaxID = min(self.__response['content']['statuses'], key=lambda i: i['id'])['id'] - 1

else: # we got less tweets than requested -> no more results in API
Expand Down
2 changes: 1 addition & 1 deletion TwitterSearch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'TwitterSearch'
__version__ = '0.78.22'
__version__ = '0.78.3'
__author__ = 'Christian Koepp'
__license__ = 'MIT'
__copyright__ = 'Copyright 2013 Christian Koepp'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def requirements():
return req

setup(name='TwitterSearch',
version='0.78.2',
version='0.78.3',
description='A library to easily iterate tweets found by the Twitter Search API',
long_description=readme(),
url='http://github.com/ckoepp/TwitterSearch',
Expand Down

0 comments on commit 2bf8b01

Please sign in to comment.