]> jfr.im git - z_archive/twitter.git/commitdiff
Set a timeout on the main sample stream to test that code path.
authorAndrew W. Donoho <redacted>
Tue, 28 Jan 2014 20:57:26 +0000 (14:57 -0600)
committerAndrew W. Donoho <redacted>
Tue, 28 Jan 2014 20:57:26 +0000 (14:57 -0600)
twitter/stream_example.py

index 5f2dbdf5d80ee97acfe4d1cfe38a862e21f9574a..571886c6e4db0ecf0bae6db2d2960f6d00763708 100644 (file)
@@ -46,7 +46,7 @@ def main():
         stream = TwitterStream(auth=auth, domain='sitestream.twitter.com')
         tweet_iter = stream.site()
     else:
-        stream = TwitterStream(auth=auth)
+        stream = TwitterStream(auth=auth, timeout=60.0)
         tweet_iter = stream.statuses.sample()
 
     # Iterate over the sample stream.