Fix clusterfuzz check in auto-roll.
authormachenbach@chromium.org <machenbach@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 25 Jun 2014 08:44:59 +0000 (08:44 +0000)
committermachenbach@chromium.org <machenbach@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 25 Jun 2014 08:44:59 +0000 (08:44 +0000)
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

tools/push-to-trunk/auto_roll.py
tools/push-to-trunk/common_includes.py

index e6cbed5..6e6c7fe 100755 (executable)
@@ -80,7 +80,7 @@ class CheckClusterFuzz(Step):
     result = self._side_effect_handler.ReadClusterFuzzAPI(
         api_key, job_type="linux_asan_d8_dbg", reproducible="True",
         open="True", bug_information="",
-        revision_greater_or_equal=self["last_push"])
+        revision_greater_or_equal=str(self["last_push"]))
     if result:
       print "Stop due to pending ClusterFuzz issues."
       return True
index 86d33ca..4dfb6d7 100644 (file)
@@ -37,6 +37,7 @@ import subprocess
 import sys
 import textwrap
 import time
+import urllib
 import urllib2
 
 from git_recipes import GitRecipesMixin
@@ -209,7 +210,7 @@ class SideEffectHandler(object):  # pragma: no cover
       url_fh.close()
 
   def ReadClusterFuzzAPI(self, api_key, **params):
-    params["api_key"] = api_key
+    params["api_key"] = api_key.strip()
     params = urllib.urlencode(params)
 
     headers = {"Content-type": "application/x-www-form-urlencoded"}