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

Unified Diff: mojo/public/tools/pylib/gs.py

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months 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 | « mojo/public/tools/prepend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/pylib/gs.py
diff --git a/mojo/public/tools/pylib/gs.py b/mojo/public/tools/pylib/gs.py
deleted file mode 100644
index f8761b53b1dc95bc1617ed00b5eec45194ba0b90..0000000000000000000000000000000000000000
--- a/mojo/public/tools/pylib/gs.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import subprocess
-import sys
-
-def download_from_public_bucket(gs_path, output_path, depot_tools_path):
- gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil")
-
- # We're downloading from a public bucket which does not need authentication,
- # but the user might have busted credential files somewhere such as ~/.boto
- # that the gsutil script will try (and fail) to use. Setting these
- # environment variables convinces gsutil not to attempt to use these, but
- # also generates a useless warning about failing to load the file. We want
- # to discard this warning but still preserve all output in the case of an
- # actual failure. So, we run the script and capture all output and then
- # throw the output away if the script succeeds (return code 0).
- env = os.environ.copy()
- env["AWS_CREDENTIAL_FILE"] = ""
- env["BOTO_CONFIG"] = ""
- try:
- subprocess.check_output(
- [gsutil_exe,
- "--bypass_prodaccess",
- "cp",
- gs_path,
- output_path],
- stderr=subprocess.STDOUT,
- env=env)
- except subprocess.CalledProcessError as e:
- print e.output
- sys.exit(1)
« no previous file with comments | « mojo/public/tools/prepend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698