diff options
author | 2017-05-04 01:24:07 +0000 | |
---|---|---|
committer | 2017-05-04 01:24:07 +0000 | |
commit | a34afb31bd142a798ba2c4b4ceb125cf74274dc8 (patch) | |
tree | d213c3639ec84cdbdcabcb2863d56c8dc155c872 /yardstick/benchmark | |
parent | bd76fc20362d5cf0ff67e8c5b29cbdd034d8b23c (diff) | |
parent | 1f59f2e6769cc7ae6f3b73eb1ce8ee09f2929f72 (diff) |
Merge "Bugfix: KeyError when using http dispatcher"
Diffstat (limited to 'yardstick/benchmark')
-rwxr-xr-x | yardstick/benchmark/runners/base.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py index 7c76e42df..b48ed973a 100755 --- a/yardstick/benchmark/runners/base.py +++ b/yardstick/benchmark/runners/base.py @@ -22,6 +22,7 @@ import logging import multiprocessing import subprocess import time +import os import traceback from oslo_config import cfg @@ -40,7 +41,11 @@ def _output_serializer_main(filename, queue, config): Use of this process enables multiple instances of a scenario without messing up the output file. """ - out_type = config['yardstick'].get('DEFAULT', {}).get('dispatcher', 'file') + try: + out_type = config['yardstick'].get('DEFAULT', {})['dispatcher'] + except KeyError: + out_type = os.environ.get('DISPATCHER', 'file') + conf = { 'type': out_type.capitalize(), 'file_path': filename |