Commit 5b76b365 authored by Aaron1011's avatar Aaron1011
Browse files

Merge pull request #505 from joausaga/master

Modify on_data method of StreamListener to process warning messages
parents 3a44f136 827b767e
......@@ -68,6 +68,9 @@ class StreamListener(object):
elif 'disconnect' in data:
if self.on_disconnect(data['disconnect']) is False:
return False
elif 'warning' in data:
if self.on_warning(data['warning']) is False:
return False
logging.error("Unknown message type: " + str(raw_data))
......@@ -99,7 +102,7 @@ class StreamListener(object):
def on_limit(self, track):
"""Called when a limitation notice arrvies"""
"""Called when a limitation notice arrives"""
def on_error(self, status_code):
......@@ -117,6 +120,10 @@ class StreamListener(object):
def on_warning(self, notice):
"""Called when a disconnection warning message arrives"""
class ReadBuffer(object):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment