Skip to content

Commit e398dcb

Browse files
committed
Fixed bug causing --show-task-ratio to crash in Python 3. Fixes locustio#540.
1 parent a0b9607 commit e398dcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

locust/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ def main():
376376
names = set(arguments) & set(locusts.keys())
377377
locust_classes = [locusts[n] for n in names]
378378
else:
379-
locust_classes = locusts.values()
379+
# list() call is needed to consume the dict_view object in Python 3
380+
locust_classes = list(locusts.values())
380381

381382
if options.show_task_ratio:
382383
console_logger.info("\n Task ratio per locust class")

0 commit comments

Comments
 (0)