summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-17 02:38:57 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-17 02:38:57 +0000
commited6b63465482b30fd6cf995d2a3167a62a864346 (patch)
treea32d04c19b2febbf97ab3e57d838ecaddf252290
parent2fa6b511f1a6c1a3372aacdacf7b6f68a4c72ddf (diff)
parent57aa1e51811e4da4241c329e5594e962c18d11d2 (diff)
Merge "Fix error in py35"
-rw-r--r--qtip/reporter/testapi.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/qtip/reporter/testapi.py b/qtip/reporter/testapi.py
index a0be5379..512dadde 100644
--- a/qtip/reporter/testapi.py
+++ b/qtip/reporter/testapi.py
@@ -29,19 +29,21 @@ def validate_payload():
if set(payload.keys()) != payload_template:
missing_parameters = list(payload_template -
set(payload.keys()))
- print "Missing Parameters -- {}".\
- format(",".join(missing_parameters))
+ print("Missing Parameters -- {}".
+ format(",".join(missing_parameters)))
raise MissingParamsError("push_results", missing_parameters)
invalid_params = []
for key in payload:
if (payload[key] == "") or (payload[key] is None):
invalid_params.append(key)
if len(invalid_params) > 0:
- print "Invalid or missing values of parameters -- `{}`".\
- format(",".join(invalid_params))
+ print ("Invalid or missing values of parameters -- `{}`".
+ format(",".join(invalid_params)))
raise InvalidParamsError("push_results", invalid_params)
return func(testapi_url, payload)
+
return _execute
+
return _decorator