Allow int or str IDs as streaming arguments
authorfitnr <fitnr@fakeisthenewreal>
Tue, 3 Jan 2017 02:04:31 +0000 (21:04 -0500)
committerfitnr <fitnr@fakeisthenewreal>
Tue, 3 Jan 2017 02:04:31 +0000 (21:04 -0500)
tweepy/streaming.py

index e272fb8c879e581bc6d28b0179d798bcc9d4a75f..c98fab9ba82a21885bb4efd6b9571edc23ac206d 100644 (file)
@@ -430,10 +430,13 @@ class Stream(object):
         if self.running:
             raise TweepError('Stream object already connected!')
         self.url = '/%s/statuses/filter.json' % STREAM_VERSION
+
         if follow:
-            self.body['follow'] = u','.join(follow).encode(encoding)
+            self.body['follow'] = u','.join(str(f) for f in follow).encode(encoding)
+
         if track:
-            self.body['track'] = u','.join(track).encode(encoding)
+            self.body['track'] = u','.join(str(f) for f in track).encode(encoding)
+
         if locations and len(locations) > 0:
             if len(locations) % 4 != 0:
                 raise TweepError("Wrong number of locations points, "