Fix clusterfuzz check in auto-roll.

Minor fixes: Strip new lines from api key. Missing import. Use string query parameters.

BUG=
TBR=jarin@chromium.org

Review URL: https://codereview.chromium.org/353813002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c0dd51ef
...@@ -80,7 +80,7 @@ class CheckClusterFuzz(Step): ...@@ -80,7 +80,7 @@ class CheckClusterFuzz(Step):
result = self._side_effect_handler.ReadClusterFuzzAPI( result = self._side_effect_handler.ReadClusterFuzzAPI(
api_key, job_type="linux_asan_d8_dbg", reproducible="True", api_key, job_type="linux_asan_d8_dbg", reproducible="True",
open="True", bug_information="", open="True", bug_information="",
revision_greater_or_equal=self["last_push"]) revision_greater_or_equal=str(self["last_push"]))
if result: if result:
print "Stop due to pending ClusterFuzz issues." print "Stop due to pending ClusterFuzz issues."
return True return True
......
...@@ -37,6 +37,7 @@ import subprocess ...@@ -37,6 +37,7 @@ import subprocess
import sys import sys
import textwrap import textwrap
import time import time
import urllib
import urllib2 import urllib2
from git_recipes import GitRecipesMixin from git_recipes import GitRecipesMixin
...@@ -209,7 +210,7 @@ class SideEffectHandler(object): # pragma: no cover ...@@ -209,7 +210,7 @@ class SideEffectHandler(object): # pragma: no cover
url_fh.close() url_fh.close()
def ReadClusterFuzzAPI(self, api_key, **params): def ReadClusterFuzzAPI(self, api_key, **params):
params["api_key"] = api_key params["api_key"] = api_key.strip()
params = urllib.urlencode(params) params = urllib.urlencode(params)
headers = {"Content-type": "application/x-www-form-urlencoded"} headers = {"Content-type": "application/x-www-form-urlencoded"}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment