Formatting: Format all python code with black.
This CL is probably not what you're looking for, it's only
automated formatting. Ignore it with
`git blame --ignore-rev <revision>` for this commit.
BUG=b:233893248
TEST=CQ
Change-Id: I66591d7a738d241aed3290138c0f68065ab10a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3879174
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
diff --git a/scripts/gs_fetch_binpkg.py b/scripts/gs_fetch_binpkg.py
index ed3266f..334a01a 100644
--- a/scripts/gs_fetch_binpkg.py
+++ b/scripts/gs_fetch_binpkg.py
@@ -22,34 +22,36 @@
def GetParser():
- """Creates the argparse parser."""
- parser = commandline.ArgumentParser(description=__doc__)
- parser.add_argument('--boto', type='path', help='Path to boto auth file.')
- parser.add_argument('uri', type='gs_path',
- help='Google Storage URI to download')
- parser.add_argument('filename', type='path',
- help='Location to store the file.')
- return parser
+ """Creates the argparse parser."""
+ parser = commandline.ArgumentParser(description=__doc__)
+ parser.add_argument("--boto", type="path", help="Path to boto auth file.")
+ parser.add_argument(
+ "uri", type="gs_path", help="Google Storage URI to download"
+ )
+ parser.add_argument(
+ "filename", type="path", 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)
- shutil.move(temp_path, filename)
- finally:
+ """Run the copy using a temp file."""
+ temp_path = "%s.tmp" % filename
osutils.SafeUnlink(temp_path)
+ try:
+ 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)
- options.Freeze()
- ctx = gs.GSContext(boto_file=options.boto)
- try:
- Copy(ctx, options.uri, options.filename)
- except gs.GSContextException as ex:
- # Hide the stack trace using Die.
- cros_build_lib.Die('%s', ex)
+ parser = GetParser()
+ options = parser.parse_args(argv)
+ options.Freeze()
+ ctx = gs.GSContext(boto_file=options.boto)
+ try:
+ Copy(ctx, options.uri, options.filename)
+ except gs.GSContextException as ex:
+ # Hide the stack trace using Die.
+ cros_build_lib.Die("%s", ex)