remove needless brackets
If the cfg don't have the key, it will raise "PipelineException" ahead, so here is no need to set default value. Change-Id: Id2865ac55ff6d7042084471ab40def4f5ac64c3b
This commit is contained in:
parent
683069a150
commit
0202c64de1
@ -703,7 +703,7 @@ class PipelineManager(object):
|
||||
|
||||
unique_names = set()
|
||||
sources = []
|
||||
for s in cfg.get('sources', []):
|
||||
for s in cfg.get('sources'):
|
||||
name = s.get('name')
|
||||
if name in unique_names:
|
||||
raise PipelineException("Duplicated source names: %s" %
|
||||
@ -714,7 +714,7 @@ class PipelineManager(object):
|
||||
unique_names.clear()
|
||||
|
||||
sinks = {}
|
||||
for s in cfg.get('sinks', []):
|
||||
for s in cfg.get('sinks'):
|
||||
name = s.get('name')
|
||||
if name in unique_names:
|
||||
raise PipelineException("Duplicated sink names: %s" %
|
||||
@ -764,7 +764,7 @@ class PollingManager(object):
|
||||
LOG.info(_LI('detected decoupled pipeline config format'))
|
||||
|
||||
unique_names = set()
|
||||
for s in cfg.get('sources', []):
|
||||
for s in cfg.get('sources'):
|
||||
name = s.get('name')
|
||||
if name in unique_names:
|
||||
raise PipelineException("Duplicated source names: %s" %
|
||||
|
Loading…
Reference in New Issue
Block a user