mirror of
https://github.com/django/daphne.git
synced 2025-04-21 17:22:03 +03:00
Fixed #101: Obscure error when strings in routing list.
This commit is contained in:
parent
49d32a71e3
commit
40b2348600
|
@ -24,7 +24,11 @@ class Router(object):
|
|||
# Expand those entries recursively into a flat list of Routes
|
||||
self.routing = []
|
||||
for entry in routing:
|
||||
self.routing.extend(entry.expand_routes())
|
||||
try:
|
||||
self.routing.extend(entry.expand_routes())
|
||||
except AttributeError:
|
||||
# It's not a valid route
|
||||
raise ValueError("Encountered %r in routing config, which is not a valid route() or include()" % entry)
|
||||
# Now go through that list and collect channel names into a set
|
||||
self.channels = {
|
||||
route.channel
|
||||
|
|
Loading…
Reference in New Issue
Block a user