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:
Darshna Das 2021-04-25 12:07:54 +00:00
parent e8abda8674
commit f2eceb3a39
1 changed files with 1 additions and 1 deletions

View File

@ -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(