From 38e7f01ee85117e853a6652e2794a973fb051600 Mon Sep 17 00:00:00 2001 From: lm Date: Fri, 17 Jan 2014 17:13:33 +0800 Subject: [PATCH] decode 'payload' to utf-8 and ignore invalid bytes --- tools/jenkins-scripts/pull-request-builder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/jenkins-scripts/pull-request-builder.py b/tools/jenkins-scripts/pull-request-builder.py index 0b0733639b..91b54c7f69 100755 --- a/tools/jenkins-scripts/pull-request-builder.py +++ b/tools/jenkins-scripts/pull-request-builder.py @@ -27,6 +27,7 @@ def set_description(desc, url): def main(): #get payload from os env payload_str = os.environ['payload'] + payload_str = payload_str.decode('utf-8','ignore') #parse to json obj payload = json.loads(payload_str)