diff options
author | Lorenz Diener <[email protected]> | 2018-04-17 14:35:09 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-04-17 14:35:09 +0200 |
commit | d0ae9dcd055e3bdc96a5ab817d14cda012516297 (patch) | |
tree | ceeb6ef7909f3dd4e217124cb0778208aabf5c06 /mastodon/streaming.py | |
parent | 86ec5d7eca078e125837f29dcb7a92030e4ae1b4 (diff) | |
download | mastodon.py-d0ae9dcd055e3bdc96a5ab817d14cda012516297.tar.gz |
Add async autoreconnect
Diffstat (limited to 'mastodon/streaming.py')
-rw-r--r-- | mastodon/streaming.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mastodon/streaming.py b/mastodon/streaming.py index f59b431..1c73f48 100644 --- a/mastodon/streaming.py +++ b/mastodon/streaming.py | |||
@@ -6,7 +6,7 @@ https://github.com/tootsuite/mastodon/blob/master/docs/Using-the-API/Streaming-A | |||
6 | import json | 6 | import json |
7 | import six | 7 | import six |
8 | from mastodon import Mastodon | 8 | from mastodon import Mastodon |
9 | from mastodon.Mastodon import MastodonMalformedEventError | 9 | from mastodon.Mastodon import MastodonMalformedEventError, MastodonNetworkError |
10 | from requests.exceptions import ChunkedEncodingError | 10 | from requests.exceptions import ChunkedEncodingError |
11 | 11 | ||
12 | class StreamListener(object): | 12 | class StreamListener(object): |
@@ -109,7 +109,6 @@ class StreamListener(object): | |||
109 | err | 109 | err |
110 | ) | 110 | ) |
111 | else: | 111 | else: |
112 | # TODO: allow handlers to return/raise to stop streaming cleanly | ||
113 | handler(payload) | 112 | handler(payload) |
114 | 113 | ||
115 | class CallbackStreamListener(StreamListener): | 114 | class CallbackStreamListener(StreamListener): |