diff options
author | Tomofumi Hayashi <tohayash@redhat.com> | 2016-11-15 18:26:29 +0900 |
---|---|---|
committer | Tomofumi Hayashi <tohayash@redhat.com> | 2016-11-15 18:26:29 +0900 |
commit | d38cc2e9ada03a2c257bf74a751070eb47036b64 (patch) | |
tree | a1f2d1895a0f3ee414540ab67d6a078a0a688893 | |
parent | 64b221bee631cf52bf6a1109c16f9544eff58f80 (diff) |
Fix option handling in case of no '--tag' option.
In case of default, 'None' is in kwargs['tag'] so need to
check it in option handling. The code is to fix it.
Change-Id: Iaadf7e6f0f064dda819970346a810a6a8b47c74c
Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
-rwxr-xr-x | dovetail/run.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dovetail/run.py b/dovetail/run.py index b4b9dda4..0ebae734 100755 --- a/dovetail/run.py +++ b/dovetail/run.py @@ -87,7 +87,7 @@ def run_test(scenario): def validate_options(input_dict): # for 'tag' option for key, value in input_dict.items(): - if key == 'tag': + if key == 'tag' and value is not None: for tag in value.split(','): if len(tag.split(':')) != 2: logger.error('TAGS option must be "<image>:<tag>,..."') @@ -117,7 +117,7 @@ def main(*args, **kwargs): dovetail_config['yardstick']['envs']) load_testcase() scenario_yaml = load_scenario(kwargs['scenario']) - if 'tag' in kwargs: + if 'tag' in kwargs and kwargs['tag'] is not None: set_container_tags(kwargs['tag']) run_test(scenario_yaml) Report.generate(scenario_yaml) |