gs_fetch_binpkg: do not log output by default
When this tool works, we don't care about the random spew. In the
default copy mode, you get messages in stderr about what it did.
When it fails, the exception message dumps the stderr for us.
BUG=None
TEST=`./buildbot/run_tests` passes
TEST=`gs_fetch_binpkg gs://chromeos-prebuilt/host/amd64/amd64-host/chroot-2014.05.06.100949/packages/Packages f` shows gsutil command only
TEST=`gs_fetch_binpkg gs://chromeos-prebuilt/asdfasdf f` shows full gsutil error message
Change-Id: I81344e273248b314266d733bc01e0795268364d6
Reviewed-on: https://chromium-review.googlesource.com/198850
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/gs_fetch_binpkg.py b/scripts/gs_fetch_binpkg.py
index 372ce37..c696064 100644
--- a/scripts/gs_fetch_binpkg.py
+++ b/scripts/gs_fetch_binpkg.py
@@ -29,16 +29,18 @@
parser.add_argument('filename', help='Location to store the file.')
return parser
+
def Copy(ctx, uri, filename):
"""Run the copy using a temp file."""
temp_path = '%s.tmp' % filename
osutils.SafeUnlink(temp_path)
try:
- ctx.Copy(uri, temp_path, log_output=True)
+ ctx.Copy(uri, temp_path)
shutil.move(temp_path, filename)
finally:
osutils.SafeUnlink(temp_path)
+
def main(argv):
parser = GetParser()
options = parser.parse_args(argv)