From: Harmon Date: Sun, 24 Jan 2021 14:45:02 +0000 (-0600) Subject: Rename Stream.on_disconnect to on_disconnect_message X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6c3b997df0070b6ab7ead9cd0482cb66088ef229;p=tweepy.git Rename Stream.on_disconnect to on_disconnect_message --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index d94a4f1..6e1a0db 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -227,7 +227,7 @@ class Stream: delete = data['delete']['status'] return self.on_delete(delete['id'], delete['user_id']) if 'disconnect' in data: - return self.on_disconnect(data['disconnect']) + return self.on_disconnect_message(data['disconnect']) if 'limit' in data: return self.on_limit(data['limit']['track']) if 'scrub_geo' in data: @@ -249,7 +249,7 @@ class Stream: """Called when a delete notice arrives for a status""" log.debug("Received status deletion notice: %d", status_id) - def on_disconnect(self, notice): + def on_disconnect_message(self, notice): """Called when twitter sends a disconnect notice Disconnect codes are listed here: