Binding can be missing in config
This commit is contained in:
@@ -156,11 +156,12 @@ class Config(dict):
|
|||||||
specified the default binding for that service is searched for.
|
specified the default binding for that service is searched for.
|
||||||
:return: Possible empty list of endpoints
|
:return: Possible empty list of endpoints
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
res = []
|
res = []
|
||||||
for spec in self["service"][typ]["endpoints"][service]:
|
for spec in self["service"][typ]["endpoints"][service]:
|
||||||
if isinstance(spec, basestring):
|
if isinstance(spec, basestring):
|
||||||
if binding == None:
|
if binding == None or binding == DEFAULT_BINDING[service]:
|
||||||
res.append(spec)
|
res.append(spec)
|
||||||
elif isinstance(spec, tuple):
|
elif isinstance(spec, tuple):
|
||||||
if binding == spec[1]:
|
if binding == spec[1]:
|
||||||
|
|||||||
Reference in New Issue
Block a user