mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +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
|
# Expand those entries recursively into a flat list of Routes
|
||||||
self.routing = []
|
self.routing = []
|
||||||
for entry in 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
|
# Now go through that list and collect channel names into a set
|
||||||
self.channels = {
|
self.channels = {
|
||||||
route.channel
|
route.channel
|
||||||
|
|
Loading…
Reference in New Issue
Block a user