Merge pull request #5114 from lmskater/develop

[jenkins] decode 'payload' to utf-8 and ignore invalid bytes
This commit is contained in:
James Chen 2014-01-17 02:18:58 -08:00
commit 0b39829b36
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ def set_description(desc, url):
def main(): def main():
#get payload from os env #get payload from os env
payload_str = os.environ['payload'] payload_str = os.environ['payload']
payload_str = payload_str.decode('utf-8','ignore')
#parse to json obj #parse to json obj
payload = json.loads(payload_str) payload = json.loads(payload_str)