Fix streaming to properly parse next object length.
authorJoshua Roesslein <jroesslein@gmail.com>
Mon, 9 Jul 2012 05:51:27 +0000 (22:51 -0700)
committerJoshua Roesslein <jroesslein@gmail.com>
Mon, 9 Jul 2012 05:51:27 +0000 (22:51 -0700)
tweepy/streaming.py

index 13f7b2ae42a8d94d16bd8f31dd2cd56671e1390f..2d76a97353fb0ff949ebf23fe10907dcf22d70d0 100644 (file)
@@ -157,7 +157,7 @@ class Stream(object):
                 delimited_string += d
 
             # read the next twitter status object
-            if delimited_string.isdigit():
+            if delimited_string.strip().isdigit():
                 next_status_obj = resp.read( int(delimited_string) )
                 self._data(next_status_obj)