aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-02-14 06:05:28 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-14 06:05:28 +0000
commitbb1d956508f0fc566805c4a26e43c1fc17b329ce (patch)
tree0b6fcd6ecd5d60022263b55b66c86b9a6be9f59d
parent4862f2b4033e5792015a9ab920262af4edaaf27c (diff)
parent8b171aaddfd9d7131501c06e4041f34c7bdbad9d (diff)
Merge "vnf_generic: replace list comprehension with generator expression"
-rw-r--r--yardstick/benchmark/scenarios/networking/vnf_generic.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py
index 2956d6d22..447c550ed 100644
--- a/yardstick/benchmark/scenarios/networking/vnf_generic.py
+++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py
@@ -237,10 +237,10 @@ class NetworkServiceTestCase(base.Scenario):
import_modules_from_package(
"yardstick.network_services.vnf_generic.vnf")
expected_name = vnf_model['id']
- impl = [c for c in itersubclasses(GenericVNF)
- if c.__name__ == expected_name]
+ impl = (c for c in itersubclasses(GenericVNF)
+ if c.__name__ == expected_name)
try:
- return next(iter(impl))
+ return next(impl)
except StopIteration:
raise IncorrectConfig("No implementation for %s", expected_name)