mirror of
https://github.com/django/daphne.git
synced 2025-07-04 20:03:07 +03:00
Change type of error
This commit is contained in:
parent
8fdf268574
commit
8abe53e170
|
@ -34,7 +34,7 @@ class Channel(object):
|
||||||
Send a message over the channel - messages are always dicts.
|
Send a message over the channel - messages are always dicts.
|
||||||
"""
|
"""
|
||||||
if not isinstance(content, dict):
|
if not isinstance(content, dict):
|
||||||
raise ValueError("You can only send dicts as content on channels.")
|
raise TypeError("You can only send dicts as content on channels.")
|
||||||
self.channel_layer.send(self.name, content)
|
self.channel_layer.send(self.name, content)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user