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:
ZTE-SuZhengwei 2016-08-30 16:17:55 +08:00 committed by Su Zhengwei
parent 683069a150
commit 0202c64de1

View File

@ -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" %