diff options
Diffstat (limited to 'mastodon/streaming.py')
-rw-r--r-- | mastodon/streaming.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mastodon/streaming.py b/mastodon/streaming.py index e43d7d6..08f5670 100644 --- a/mastodon/streaming.py +++ b/mastodon/streaming.py | |||
@@ -213,11 +213,11 @@ class CallbackStreamListener(StreamListener): | |||
213 | self.status_update_handler = status_update_handler | 213 | self.status_update_handler = status_update_handler |
214 | 214 | ||
215 | def on_update(self, status): | 215 | def on_update(self, status): |
216 | if self.update_handler != None: | 216 | if self.update_handler is not None: |
217 | self.update_handler(status) | 217 | self.update_handler(status) |
218 | 218 | ||
219 | try: | 219 | try: |
220 | if self.local_update_handler != None and not "@" in status["account"]["acct"]: | 220 | if self.local_update_handler is not None and not "@" in status["account"]["acct"]: |
221 | self.local_update_handler(status) | 221 | self.local_update_handler(status) |
222 | except Exception as err: | 222 | except Exception as err: |
223 | six.raise_from( | 223 | six.raise_from( |
@@ -226,21 +226,21 @@ class CallbackStreamListener(StreamListener): | |||
226 | ) | 226 | ) |
227 | 227 | ||
228 | def on_delete(self, deleted_id): | 228 | def on_delete(self, deleted_id): |
229 | if self.delete_handler != None: | 229 | if self.delete_handler is not None: |
230 | self.delete_handler(deleted_id) | 230 | self.delete_handler(deleted_id) |
231 | 231 | ||
232 | def on_notification(self, notification): | 232 | def on_notification(self, notification): |
233 | if self.notification_handler != None: | 233 | if self.notification_handler is not None: |
234 | self.notification_handler(notification) | 234 | self.notification_handler(notification) |
235 | 235 | ||
236 | def on_conversation(self, conversation): | 236 | def on_conversation(self, conversation): |
237 | if self.conversation_handler != None: | 237 | if self.conversation_handler is not None: |
238 | self.conversation_handler(conversation) | 238 | self.conversation_handler(conversation) |
239 | 239 | ||
240 | def on_unknown_event(self, name, unknown_event=None): | 240 | def on_unknown_event(self, name, unknown_event=None): |
241 | if self.unknown_event_handler != None: | 241 | if self.unknown_event_handler is not None: |
242 | self.unknown_event_handler(name, unknown_event) | 242 | self.unknown_event_handler(name, unknown_event) |
243 | 243 | ||
244 | def on_status_update(self, status): | 244 | def on_status_update(self, status): |
245 | if self.status_update_handler != None: | 245 | if self.status_update_handler is not None: |
246 | self.status_update_handler(status) | 246 | self.status_update_handler(status) |