diff options
author | Rémi Duraffort <remi.duraffort@linaro.org> | 2018-03-29 14:35:32 +0200 |
---|---|---|
committer | Rémi Duraffort <remi.duraffort@linaro.org> | 2018-03-29 15:16:06 +0200 |
commit | b67fb42052bc89dbb5bcbfefcb7b614b33c0ec19 (patch) | |
tree | 5ab52806b3071ff2ab649b00acde26b589f865b5 /lava_dispatcher/actions/test | |
parent | bb910afd6e7da82670e3f345dd012044c0f76f42 (diff) |
Fix raise format
"%" should be used for string substitutions when calling raise (while logging
will handle that correctly).
Change-Id: Ia640945945061bac7993a32830f7a49c04f6e96c
Diffstat (limited to 'lava_dispatcher/actions/test')
-rw-r--r-- | lava_dispatcher/actions/test/shell.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lava_dispatcher/actions/test/shell.py b/lava_dispatcher/actions/test/shell.py index 8a973f410..577e84e7e 100644 --- a/lava_dispatcher/actions/test/shell.py +++ b/lava_dispatcher/actions/test/shell.py @@ -410,9 +410,7 @@ class TestShellAction(TestAction): # prevent losing data in the update # FIXME: support parameters and retries if res["test_case_id"] in p_res: - raise JobError( - "Duplicate test_case_id in results: %s", - res["test_case_id"]) + raise JobError("Duplicate test_case_id in results: %s" % res["test_case_id"]) # turn the result dict inside out to get the unique # test_case_id/testset_name as key and result as value res_data = { @@ -425,7 +423,7 @@ class TestShellAction(TestAction): try: measurement = decimal.Decimal(res['measurement']) except decimal.InvalidOperation: - raise TestError("Invalid measurement %s", res['measurement']) + raise TestError("Invalid measurement %s" % res['measurement']) res_data['measurement'] = measurement if 'units' in res: res_data['units'] = res['units'] @@ -516,7 +514,7 @@ class TestShellAction(TestAction): try: measurement = decimal.Decimal(res['measurement']) except decimal.InvalidOperation: - raise TestError("Invalid measurement %s", res['measurement']) + raise TestError("Invalid measurement %s" % res['measurement']) res_data['measurement'] = measurement if 'units' in res: res_data['units'] = res['units'] |