mirror of
https://github.com/django/daphne.git
synced 2025-07-10 16:02:18 +03:00
move assert where it is needed
This commit is contained in:
parent
6104f89925
commit
74c72f0126
|
@ -97,9 +97,9 @@ class Binding(object):
|
||||||
self = cls()
|
self = cls()
|
||||||
self.instance = instance
|
self.instance = instance
|
||||||
# Check to see if we're covered
|
# Check to see if we're covered
|
||||||
assert self.stream is not None
|
|
||||||
payload = self.serialize(instance, action)
|
payload = self.serialize(instance, action)
|
||||||
if payload != {}:
|
if payload != {}:
|
||||||
|
assert self.stream is not None
|
||||||
message = WebsocketDemultiplexer.encode(self.stream, payload)
|
message = WebsocketDemultiplexer.encode(self.stream, payload)
|
||||||
for group_name in self.group_names(instance, action):
|
for group_name in self.group_names(instance, action):
|
||||||
group = Group(group_name)
|
group = Group(group_name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user