Authored by chunhua.zhang

add

@@ -71,7 +71,8 @@ def ansible_tower_process(newmaster, failmaster): @@ -71,7 +71,8 @@ def ansible_tower_process(newmaster, failmaster):
71 make_sure_job_success(job_id) 71 make_sure_job_success(job_id)
72 72
73 #update git 73 #update git
74 - jenkins_param = {"token": JENKINS_TOKEN, "MODIFY_ENV": INVENTORY_ENV[inventory], "key": ",".join(keys), "value": ",".join(values)} 74 + if keys and values:
  75 + jenkins_param = {"token": JENKINS_TOKEN, "MODIFY_ENV": INVENTORY_ENV[inventory], "keys": ",".join(keys), "values": ",".join(values)}
75 requests.get(JENKINS_UPDATE_VAR_URL, params = jenkins_param) 76 requests.get(JENKINS_UPDATE_VAR_URL, params = jenkins_param)
76 return 0 77 return 0
77 78