Permalink
Browse files

GH-1: Fixing bug in the twitter aggregator.

This was apparently only working because `file` continued to exist
after the `with` statement in Python 2.6.*.  Python 2.7.* rightly
threw an error.
  • Loading branch information...
1 parent 03c4f16 commit 33216e4b49ea9158eb9bbffac6e1c66441eeef9f Mike's Gitbot committed Jan 30, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 _aggregators/aggregator.twitter.py
@@ -40,8 +40,9 @@ def get_latest_tweet_id( self ):
for file in directory[2]:
if file > self.latest_id:
self.latest_id = file
- m = re.search( '-(\d+).yaml', file )
- self.latest_id = m.group( 1 )
+ if self.latest_id != '':
+ m = re.search( '-(\d+).yaml', self.latest_id )
+ self.latest_id = m.group( 1 )
def get_new_tweets( self ):
endpoint = 'http://twitter.com/statuses/user_timeline/%s.json?count=200&since_id=%s'

0 comments on commit 33216e4

Please sign in to comment.