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

Unified Diff: sdk_build/data/common/download_file_from_google_storage.py

Issue 1760403003: SDK: Improve the C++ SDK readme, and add some missing docstrings. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | sdk_build/data/cpp/README-sdk.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk_build/data/common/download_file_from_google_storage.py
diff --git a/sdk_build/data/common/download_file_from_google_storage.py b/sdk_build/data/common/download_file_from_google_storage.py
index 28feb4d3db4d479e21aa9af637f5adaed03fee94..2798883c71a6c73283040358d8bffe72e9be679b 100755
--- a/sdk_build/data/common/download_file_from_google_storage.py
+++ b/sdk_build/data/common/download_file_from_google_storage.py
@@ -3,7 +3,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-#FIXME
+"""Script for downloading a file from Google Cloud Storage."""
+
import argparse
import hashlib
@@ -18,7 +19,9 @@ def _FatalError(message):
def _DownloadFile(source):
- """FIXME"""
+ """Downloads |source| from Google Cloud Storage. |source| should be a path,
+ including the bucket name (e.g., if the full URL is gs://mojo/a/b/c.xyz,
+ |source| should be "mojo/a/b/c.xyz")."""
try:
conn = httplib.HTTPSConnection("storage.googleapis.com")
@@ -40,7 +43,7 @@ def main():
help="SHA-1 hash for the downloaded file")
parser.add_argument("--executable", action="store_true",
help="make the downloaded file executable")
- parser.add_argument("source", help="source path, including bucket name")
+ parser.add_argument("source", help="source path, including the bucket name")
parser.add_argument("destination", help="destination path")
args = parser.parse_args()
« no previous file with comments | « no previous file | sdk_build/data/cpp/README-sdk.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698