Remove unnecessary use of set around a generator.
It is unnecessary to use list, set, dict around a generator expression to get object of that type, since there are comprehensions for these types. Change-Id: I11b9b87faacba4321ef54a48edd7f13df18e1df7
This commit is contained in:
parent
e8abda8674
commit
f2eceb3a39
|
@ -37,7 +37,7 @@ CONF = cfg.CONF
|
|||
|
||||
|
||||
def get_network_id(subnets):
|
||||
ids = list(set(net.id for net in subnets.values()))
|
||||
ids = list({net.id for net in subnets.values()})
|
||||
|
||||
if len(ids) != 1:
|
||||
raise k_exc.IntegrityError(
|
||||
|
|
Loading…
Reference in New Issue