summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yardstick/benchmark/contexts/heat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 0b2fbdcd6..a9d9e5fc0 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -220,9 +220,9 @@ class HeatContext(Context):
# copy some vital stack output into server objects
for server in self.servers:
- if len(server.ports) > 0:
+ if server.ports:
# TODO(hafe) can only handle one internal network for now
- port = list(server.ports.values())[0]
+ port = next(iter(server.ports.values()))
server.private_ip = self.stack.outputs[port["stack_name"]]
if server.floating_ip: