aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-14 17:15:20 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-14 17:15:43 +0800
commit57aa1e51811e4da4241c329e5594e962c18d11d2 (patch)
tree1c5c84157b7886e437ffd6e46535b96e475f5322
parent12b200e2c566bb0e3696ecea0d5f4fae9c74ffec (diff)
Fix error in py35
Change-Id: Iacc7bce9e1b5379907677d9fa0c26bf9c8ba155b Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-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