Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: dart/tools/bots/bot_utils.py

Issue 70223002: Only archive apidocs if they are not already there (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/editor/build/build.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/bots/bot_utils.py
diff --git a/dart/tools/bots/bot_utils.py b/dart/tools/bots/bot_utils.py
index 6ad1c2cba2bc4d77094100ffb8af8d8f729bc9f9..51b92dfc81b9e67c4b3c102aea88dd1b840f8164 100644
--- a/dart/tools/bots/bot_utils.py
+++ b/dart/tools/bots/bot_utils.py
@@ -180,18 +180,19 @@ class GCSNamerApiDocs(object):
assert len('%s' % revision) > 0
return '%s/channels/%s/latest.txt' % (self.bucket, self.channel)
-def run(command, env=None, shell=False):
+def run(command, env=None, shell=False, throw_on_error=True):
print "Running command: ", command
p = subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, env=env, shell=shell)
(stdout, stderr) = p.communicate()
- if p.returncode != 0:
+ if throw_on_error and p.returncode != 0:
print >> sys.stderr, "Failed to execute '%s'. Exit code: %s." % (
command, p.returncode)
print >> sys.stderr, "stdout: ", stdout
print >> sys.stderr, "stderr: ", stderr
raise Exception("Failed to execute %s." % command)
+ return (stdout, stderr, p.returncode)
class GSUtil(object):
GSUTIL_IS_SHELL_SCRIPT = False
« no previous file with comments | « dart/editor/build/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698